CVE-2026-140099
Forge: RSA multi- prime private keys are read as two- prime keys, and signatures leak a factor of the modulus
- Severity
- 3.7LowNetwork attack, no privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- Proof of conceptCISA reports one, no source links it
- Exploit chance
- 0.41% in 30 daysPercentile37thEPSS, scored
- Listed fix
1.4.4for node-forge (npm) From GitHub Advisories and OSV29 other affected packages
Overview
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
CVSS 3.1 vector
Exploitability
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
Impact
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:NExploit chance over time
Affected
Packages 30
| Package | Affected | Fixed |
|---|---|---|
node-forgenpm | through 1.4.3 | 1.4.4 |
| before 1.4.4 | 1.4.4 | |
python-tensorboardAzure Linux:3 | through 2.16.2-6 | None listed |
node-forgeTuxCare:npm | 1.3.3-tuxcare.0 up to 1.3.3-tuxcare.6, plus listed versions 1.3.31.3.3-tuxcare.11.3.3-tuxcare.21.3.3-tuxcare.31.3.3-tuxcare.41.3.3-tuxcare.5 | 1.3.3-tuxcare.6 |
| 0.10.0-tuxcare.0 up to 0.10.0-tuxcare.14, plus listed versions 0.10.00.10.0-tuxcare.10.10.0-tuxcare.100.10.0-tuxcare.110.10.0-tuxcare.12 Show 9 more versionsShow less0.10.0-tuxcare.130.10.0-tuxcare.20.10.0-tuxcare.30.10.0-tuxcare.40.10.0-tuxcare.50.10.0-tuxcare.60.10.0-tuxcare.70.10.0-tuxcare.80.10.0-tuxcare.9 | 0.10.0-tuxcare.14 | |
| 0.9.0-tuxcare.0 up to 0.9.0-tuxcare.7, plus listed versions 0.9.00.9.0-tuxcare.10.9.0-tuxcare.20.9.0-tuxcare.30.9.0-tuxcare.40.9.0-tuxcare.50.9.0-tuxcare.6 | 0.9.0-tuxcare.7 | |
| 0.7.6-tuxcare.0 up to 0.7.6-tuxcare.5, plus listed versions 0.7.60.7.6-tuxcare.10.7.6-tuxcare.20.7.6-tuxcare.30.7.6-tuxcare.4 | 0.7.6-tuxcare.5 | |
| 0.7.1-tuxcare.0 up to 0.7.1-tuxcare.4, plus listed versions 0.7.10.7.1-tuxcare.10.7.1-tuxcare.20.7.1-tuxcare.3 | 0.7.1-tuxcare.4 | |
kyverno-policy-reporter-ui-devDocker Hardened Images:Alpine:3.23 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
kyverno-policy-reporter-ui-devDocker Hardened Images:Alpine:3.24 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
Show 25 more packagesShow less
| Package | Affected | Fixed |
|---|---|---|
kyverno-policy-reporter-ui-fips-devDocker Hardened Images:Alpine:3.23 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
kyverno-policy-reporter-ui-fips-devDocker Hardened Images:Alpine:3.24 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
kyverno-policy-reporter-ui-fipsDocker Hardened Images:Alpine:3.23 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
kyverno-policy-reporter-ui-fipsDocker Hardened Images:Alpine:3.24 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
kyverno-policy-reporter-uiDocker Hardened Images:Alpine:3.23 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
kyverno-policy-reporter-uiDocker Hardened Images:Alpine:3.24 | 2.6.1-r0 and later, plus listed versions 2.7.0-r02.7.0-r12.7.0-r22.7.1-r02.7.1-r1 Show 20 more versionsShow less2.7.1-r22.7.2-r02.7.2-r12.7.3-r02.8.1-r02.8.1-r12.8.1-r22.8.1-r32.8.1-r42.8.1-r52.9.0-r12.9.1-r02.9.1-r12.9.1-r22.9.1-r32.9.1-r42.9.1-r52.9.1-r62.9.1-r72.9.1-r8 | None listed |
logto-1Docker Hardened Images:Alpine:3.23 | 1.45.0-r0 and later, plus listed versions 1.45.0-r11.45.0-r21.45.0-r31.45.0-r41.46.0-r0 Show 8 more versionsShow less1.46.0-r11.46.0-r21.46.0-r31.46.0-r41.46.0-r51.46.0-r61.46.0-r71.46.0-r8 | None listed |
logto-1Docker Hardened Images:Alpine:3.24 | 1.45.0-r0 and later, plus listed versions 1.45.0-r11.45.0-r21.45.0-r31.45.0-r41.46.0-r0 Show 8 more versionsShow less1.46.0-r11.46.0-r21.46.0-r31.46.0-r41.46.0-r51.46.0-r61.46.0-r71.46.0-r8 | None listed |
postman-mcpDocker Hardened Images:Alpine:3.23 | 2.11.2-r5 and later, plus listed versions 2.12.0-r02.12.2-r02.12.3-r02.13.0-r02.14.0-r02.15.0-r02.15.0-r12.15.0-r2 | None listed |
postman-mcpDocker Hardened Images:Alpine:3.24 | 2.9.1-r0 and later, plus listed versions 2.11.0-r02.11.1-r02.11.1-r12.11.2-r12.11.2-r2 Show 11 more versionsShow less2.11.2-r32.11.2-r42.11.2-r52.12.0-r02.12.2-r02.12.3-r02.13.0-r02.14.0-r02.15.0-r02.15.0-r12.15.0-r2 | None listed |
sorry-cypress-director-2Docker Hardened Images:Alpine:3.23 | 2.6.0-r0 and later, plus listed versions 2.6.0-r102.6.0-r22.6.0-r32.6.0-r42.6.0-r5 Show 4 more versionsShow less2.6.0-r62.6.0-r72.6.0-r82.6.0-r9 | None listed |
sorry-cypress-director-2Docker Hardened Images:Alpine:3.24 | 2.6.0-r0 and later, plus listed versions 2.6.0-r102.6.0-r22.6.0-r32.6.0-r42.6.0-r5 Show 4 more versionsShow less2.6.0-r62.6.0-r72.6.0-r82.6.0-r9 | None listed |
kibana-9.4Docker Hardened Images:Debian:13 | 9.4.5-1 and later, plus listed versions 9.4.10-09.4.10-19.4.10-29.4.7-09.4.8-0 Show 18 more versionsShow less9.4.8-19.4.8-119.4.8-129.4.8-139.4.8-149.4.8-29.4.8-39.4.8-49.4.8-59.4.8-69.4.8-79.4.8-89.4.8-99.4.9-09.4.9-19.4.9-29.4.9-39.4.9-4 | None listed |
kibana-9.5Docker Hardened Images:Debian:13 | 9.5.5-0 and later, plus listed versions 9.5.5-19.5.5-109.5.5-119.5.5-129.5.5-2 Show 13 more versionsShow less9.5.5-39.5.5-49.5.5-59.5.5-69.5.5-79.5.5-99.5.6-09.5.6-19.5.6-29.5.6-39.5.7-09.5.7-19.5.7-2 | None listed |
kubeflow-pipelines-frontendDocker Hardened Images:Debian:13 | 2.17.0-0 up to 2.18.0-0, plus listed versions 2.17.0-12.17.0-22.17.0-32.17.0-42.17.1-0 Show 8 more versionsShow less2.17.1-12.17.2-02.17.2-12.17.2-22.17.2-32.17.2-42.17.2-52.17.3-0 | 2.18.0-0 |
kyverno-policy-reporter-ui-devDocker Hardened Images:Debian:13 | 2.6.1-0 and later, plus listed versions 2.7.0-02.7.0-12.7.0-22.7.1-02.7.1-1 Show 20 more versionsShow less2.7.1-22.7.2-02.7.2-12.7.3-02.8.1-02.8.1-12.8.1-22.8.1-32.8.1-42.8.1-52.9.0-12.9.1-02.9.1-12.9.1-22.9.1-32.9.1-42.9.1-52.9.1-62.9.1-72.9.1-8 | None listed |
kyverno-policy-reporter-ui-fips-devDocker Hardened Images:Debian:13 | 2.6.1-0 and later, plus listed versions 2.7.0-02.7.0-12.7.0-22.7.1-02.7.1-1 Show 20 more versionsShow less2.7.1-22.7.2-02.7.2-12.7.3-02.8.1-02.8.1-12.8.1-22.8.1-32.8.1-42.8.1-52.9.0-12.9.1-02.9.1-12.9.1-22.9.1-32.9.1-42.9.1-52.9.1-62.9.1-72.9.1-8 | None listed |
kyverno-policy-reporter-ui-fipsDocker Hardened Images:Debian:13 | 2.6.1-0 and later, plus listed versions 2.7.0-02.7.0-12.7.0-22.7.1-02.7.1-1 Show 20 more versionsShow less2.7.1-22.7.2-02.7.2-12.7.3-02.8.1-02.8.1-12.8.1-22.8.1-32.8.1-42.8.1-52.9.0-12.9.1-02.9.1-12.9.1-22.9.1-32.9.1-42.9.1-52.9.1-62.9.1-72.9.1-8 | None listed |
kyverno-policy-reporter-uiDocker Hardened Images:Debian:13 | 2.6.1-0 and later, plus listed versions 2.7.0-02.7.0-12.7.0-22.7.1-02.7.1-1 Show 20 more versionsShow less2.7.1-22.7.2-02.7.2-12.7.3-02.8.1-02.8.1-12.8.1-22.8.1-32.8.1-42.8.1-52.9.0-12.9.1-02.9.1-12.9.1-22.9.1-32.9.1-42.9.1-52.9.1-62.9.1-72.9.1-8 | None listed |
logto-1Docker Hardened Images:Debian:13 | 1.45.0-0 and later, plus listed versions 1.45.0-11.45.0-21.45.0-31.45.0-41.46.0-0 Show 8 more versionsShow less1.46.0-11.46.0-21.46.0-31.46.0-41.46.0-51.46.0-61.46.0-71.46.0-8 | None listed |
opensearch-dashboardsDocker Hardened Images:Debian:13 | 3.8.0-0 and later, plus listed versions 3.10.0-03.10.0-13.10.0-23.10.0-33.10.0-4 Show 11 more versionsShow less3.10.0-53.8.0-13.8.0-23.8.0-33.9.0-03.9.0-13.9.0-23.9.0-33.9.0-43.9.0-53.9.0-6 | None listed |
postman-mcpDocker Hardened Images:Debian:13 | 2.9.1-0 and later, plus listed versions 2.11.0-02.11.1-02.11.1-12.11.2-02.11.2-1 Show 12 more versionsShow less2.11.2-22.11.2-32.11.2-52.12.0-02.12.2-02.12.3-02.13.0-02.13.0-12.14.0-02.15.0-02.15.0-12.15.0-2 | None listed |
sorry-cypress-director-2Docker Hardened Images:Debian:13 | 2.6.0-0 and later, plus listed versions 2.6.0-102.6.0-22.6.0-32.6.0-42.6.0-5 Show 4 more versionsShow less2.6.0-62.6.0-72.6.0-82.6.0-9 | None listed |
node-node-forgeUbuntu:20.04:LTS | All versions, plus listed versions 0.8.5~dfsg-20.9.1~dfsg-1 | None listed |
node-node-forgeUbuntu:22.04:LTS | All versions, plus listed versions 0.10.0~dfsg-31.2.1~dfsg-2 | None listed |
Products 1
Sources
CVE List Score usedCVSS 3.13.7
Forge: RSA multi-prime private keys are read as two-prime keys, and signatures leak a factor of the modulus
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
- Record
CVE-2026-140099- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-20, CWE-325
- Updated
- 2026-12-01
EUVDEUVD-2026-139789CVSS 3.13.7
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
- Record
EUVD-2026-139789- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-12-01
GitHub AdvisoriesGHSA-w73w-hhm4-q25pCVSS 3.13.7
Forge: RSA multi-prime private keys are read as two-prime keys, and signatures leak a factor of the modulus
Summary
pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and the otherPrimeInfos field, so a multi-prime RSA key is read with only its first two primes. Signatures made with such a key are invalid, and each one reveals a factor of the modulus to anyone who sees it. Fixed in node-forge 1.4.4.
Details
RFC 8017 (A.1.2) allows RSA private keys with more than two primes: version 1, with the extra primes in otherPrimeInfos. node-forge only supports two-prime keys, but pki.privateKeyFromAsn1() in lib/rsa.js (used by pki.privateKeyFromPem(), PKCS#8 and PKCS#12 key parsing) never checked the version, and ASN.1 validation ignores the extra field. A multi-prime key is therefore read as if it were a two-prime key with modulus n, primes p and q, and the CRT values for p and q.
forge's private-key operation uses the CRT with p and q, so its result is correct modulo pq but not modulo the remaining primes. For a signature s made this way, s^e equals the encoded message modulo pq but not modulo n, so gcd(s^e - EM, n) = pq, where EM is the PKCS#1 encoding of the signed message, which a verifier can compute. One signature therefore splits n into pq and the product of the other primes. For a three-prime key (the usual case; OpenSSL with rsa_keygen_primes:3) this reveals the third prime and leaves a two-prime modulus of about two thirds of the size: for a 2048-bit key, a 1366-bit RSA modulus instead of 2048 bits.
Decryption with such a key fails, and the signatures don't verify, so applications that use a multi-prime key with forge see errors immediately. Keys generated by forge, by OpenSSL by default, by Node.js and by most other tools are two-prime and not affected.
The fix rejects RSAPrivateKeys with a version other than 0 or with otherPrimeInfos ("Only two-prime RSAPrivateKey version 0 is supported."). This also rejects two-prime keys with an invalid version, as reported in https://github.com/digitalbazaar/forge/issues/1143.
Patches
Fixed in node-forge 1.4.4.
Workarounds
Don't use multi-prime RSA keys with node-forge. Before loading a key from an untrusted or unknown source, check that its RSAPrivateKey version is 0. Multi-prime keys that were used to sign with node-forge should be replaced, since their signatures reveal a factor of the modulus.
Related
- RFC 8017, appendix A.1.2 (RSA private key syntax): https://www.rfc-editor.org/rfc/rfc8017#appendix-A.1.2
- Issue #1143 (RSAPrivateKey version not checked): https://github.com/digitalbazaar/forge/issues/1143
- Boneh, DeMillo and Lipton, "On the Importance of Checking Cryptographic Protocols for Faults" (Eurocrypt 1997): the same gcd recovers factors from a faulty CRT signature.
Proof of concept
Generate a three-prime key and sign with forge:
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 \
-pkeyopt rsa_keygen_primes:3 -out mp3.pem
var key = forge.pki.privateKeyFromPem(pem); // <= 1.4.3: loads
var md = forge.md.sha256.create();
md.update('hello');
var s = key.sign(md);
// the signature doesn't verify (Node.js crypto.verify() is false), and
// gcd(s^e - EM, n), with EM the PKCS#1 v1.5 encoding of SHA-256('hello'),
// is a 1366-bit factor of the 2048-bit n
// 1.4.4: privateKeyFromPem() throws "Cannot read private key. Only
// two-prime RSAPrivateKey version 0 is supported."
Regression tests are in tests/unit/rsa.js ("RSAPrivateKey version").
Impact
Applications that load a multi-prime RSA private key with node-forge and sign with it are affected. Each signature reveals the product of two of the key's primes, and so the remaining prime(s), to anyone who sees the signature, which reduces the key's security (for a 2048-bit three-prime key, to that of a 1366-bit RSA key). The signatures are invalid and decryption fails, so the problem is visible to the application. Two-prime keys, which nearly all tools generate, are not affected.
- Record
GHSA-w73w-hhm4-q25p- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-20, CWE-325
- Updated
- 2026-12-01
NVDCVSS 3.13.7
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
- Record
CVE-2026-140099- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-20, CWE-325
- Updated
- 2026-12-01
OSVCVSS 3.13.7
Forge: RSA multi-prime private keys are read as two-prime keys, and signatures leak a factor of the modulus
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
- Record
CVE-2026-140099- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-20, CWE-325
- Updated
- 2026-12-01
OSVDHI-fm2t-cfqx-qt7r-6j3nCVSS 3.13.7
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4…
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
- Record
DHI-fm2t-cfqx-qt7r-6j3n- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-12-05
Show 8 more recordsShow less
OSVGHSA-w73w-hhm4-q25pCVSS 3.13.7
Forge: RSA multi-prime private keys are read as two-prime keys, and signatures leak a factor of the modulus
Summary
pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and the otherPrimeInfos field, so a multi-prime RSA key is read with only its first two primes. Signatures made with such a key are invalid, and each one reveals a factor of the modulus to anyone who sees it. Fixed in node-forge 1.4.4.
Details
RFC 8017 (A.1.2) allows RSA private keys with more than two primes: version 1, with the extra primes in otherPrimeInfos. node-forge only supports two-prime keys, but pki.privateKeyFromAsn1() in lib/rsa.js (used by pki.privateKeyFromPem(), PKCS#8 and PKCS#12 key parsing) never checked the version, and ASN.1 validation ignores the extra field. A multi-prime key is therefore read as if it were a two-prime key with modulus n, primes p and q, and the CRT values for p and q.
forge's private-key operation uses the CRT with p and q, so its result is correct modulo pq but not modulo the remaining primes. For a signature s made this way, s^e equals the encoded message modulo pq but not modulo n, so gcd(s^e - EM, n) = pq, where EM is the PKCS#1 encoding of the signed message, which a verifier can compute. One signature therefore splits n into pq and the product of the other primes. For a three-prime key (the usual case; OpenSSL with rsa_keygen_primes:3) this reveals the third prime and leaves a two-prime modulus of about two thirds of the size: for a 2048-bit key, a 1366-bit RSA modulus instead of 2048 bits.
Decryption with such a key fails, and the signatures don't verify, so applications that use a multi-prime key with forge see errors immediately. Keys generated by forge, by OpenSSL by default, by Node.js and by most other tools are two-prime and not affected.
The fix rejects RSAPrivateKeys with a version other than 0 or with otherPrimeInfos ("Only two-prime RSAPrivateKey version 0 is supported."). This also rejects two-prime keys with an invalid version, as reported in https://github.com/digitalbazaar/forge/issues/1143.
Patches
Fixed in node-forge 1.4.4.
Workarounds
Don't use multi-prime RSA keys with node-forge. Before loading a key from an untrusted or unknown source, check that its RSAPrivateKey version is 0. Multi-prime keys that were used to sign with node-forge should be replaced, since their signatures reveal a factor of the modulus.
Related
- RFC 8017, appendix A.1.2 (RSA private key syntax): https://www.rfc-editor.org/rfc/rfc8017#appendix-A.1.2
- Issue #1143 (RSAPrivateKey version not checked): https://github.com/digitalbazaar/forge/issues/1143
- Boneh, DeMillo and Lipton, "On the Importance of Checking Cryptographic Protocols for Faults" (Eurocrypt 1997): the same gcd recovers factors from a faulty CRT signature.
Proof of concept
Generate a three-prime key and sign with forge:
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 \
-pkeyopt rsa_keygen_primes:3 -out mp3.pem
var key = forge.pki.privateKeyFromPem(pem); // <= 1.4.3: loads
var md = forge.md.sha256.create();
md.update('hello');
var s = key.sign(md);
// the signature doesn't verify (Node.js crypto.verify() is false), and
// gcd(s^e - EM, n), with EM the PKCS#1 v1.5 encoding of SHA-256('hello'),
// is a 1366-bit factor of the 2048-bit n
// 1.4.4: privateKeyFromPem() throws "Cannot read private key. Only
// two-prime RSAPrivateKey version 0 is supported."
Regression tests are in tests/unit/rsa.js ("RSAPrivateKey version").
Impact
Applications that load a multi-prime RSA private key with node-forge and sign with it are affected. Each signature reveals the product of two of the key's primes, and so the remaining prime(s), to anyone who sees the signature, which reduces the key's security (for a 2048-bit three-prime key, to that of a 1366-bit RSA key). The signatures are invalid and decryption fails, so the problem is visible to the application. Two-prime keys, which nearly all tools generate, are not affected.
- Record
GHSA-w73w-hhm4-q25p- CVSS 3.1
- 3.7 Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-20, CWE-325
- Updated
- 2026-12-01
OSVAZL-117620No score
CVE-2026-140099 affecting package python-tensorboard 2.16.2-6
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.4, pki.privateKeyFromPem() and pki.privateKeyFromAsn1() ignore the RSAPrivateKey version and otherPrimeInfos fields and interpret a multi-prime RSA private key as a two-prime key. Signing then uses CRT values for only the first two primes, producing an invalid signature from which an observer can recover a factor of the modulus and reduce the effective strength of the key; two-prime keys are not affected. This issue is fixed in 1.4.4.
- Record
AZL-117620- Updated
- 2026-12-03
OSVCLSA-2026-1796199443No score
TuxCare security update for node-forge (1 CVE)
TuxCare rebuilt node-forge to address 1 CVE. Fixed in 1.3.3-tuxcare.6.
- Record
CLSA-2026-1796199443- Updated
- 2026-12-03
OSVCLSA-2026-1796224871No score
TuxCare security update for node-forge (1 CVE)
TuxCare rebuilt node-forge to address 1 CVE. Fixed in 0.10.0-tuxcare.14.
- Record
CLSA-2026-1796224871- Updated
- 2026-12-03
OSVCLSA-2026-1796225935No score
TuxCare security update for node-forge (1 CVE)
TuxCare rebuilt node-forge to address 1 CVE. Fixed in 0.9.0-tuxcare.7.
- Record
CLSA-2026-1796225935- Updated
- 2026-12-03
OSVCLSA-2026-1796291517No score
TuxCare security update for node-forge (1 CVE)
TuxCare rebuilt node-forge to address 1 CVE. Fixed in 0.7.6-tuxcare.5.
- Record
CLSA-2026-1796291517- Updated
- 2026-12-03
OSVCLSA-2026-1796295986No score
TuxCare security update for node-forge (1 CVE)
TuxCare rebuilt node-forge to address 1 CVE. Fixed in 0.7.1-tuxcare.4.
- Record
CLSA-2026-1796295986- Updated
- 2026-12-03
OSVUBUNTU-CVE-2026-140099No score
(Forge, also called node-forge, is a native implementation of Transport ...)
- Record
UBUNTU-CVE-2026-140099- Updated
- 2026-12-02
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs, references | OSV | |
| Affected packages, other IDs | OSV | |
| Affected packages, other IDs | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs, references | OSV | |
| References | OSV | |
| Affected packages | OSV | |
| Affected packages, other IDs, references | OSV | |
| Published date | EUVD, OSV | |
| Published date | EUVD | |
| Affected packages, references | OSV | |
| Affected packages, key facts, references | GitHub Advisories, NVD | |
| Key facts, references | CVE List | |
| Other IDs, references | OSV | |
| Other IDs, published date | EUVD, NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/digitalbazaar/forge/security/advisories/GHSA-w73w-hhm4-q25p
github.com/digitalbazaar/forge/issues/1143
github.com/digitalbazaar/forge/commit/8d1a7bc8ad514e70f85bf5cbe4c60cd52916fdef
github.com/digitalbazaar/forge/releases/tag/v1.4.4
nvd.nist.gov/vuln/detail/CVE-2026-140099
github.com/advisories/GHSA-w73w-hhm4-q25p
github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140099.json
scout.docker.com/v/DHI-fm2t-cfqx-qt7r-6j3n