npm
CVE-2026-118775
Forge: ASN.1 OID first arc truncation in asn1.oidToDer
- Severity
- Low 3.7
- Published
- 30 Oct 2026
- Last changed
- 30 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.4.1
- Exploit chance
- 0.3% in the next 30 daysHigher than 26% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Integer overflow (CWE-190)
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N- Also known as
- GHSA-4642-5mcj-2rqw
- Sources
- OSV.dev and GitHub
Description
asn1.oidToDer() did not range-check the first two arcs of an OID string, so an OID such as 0.42.840.113549.1.1.1 or 4294977127.18.840.113549.1.1.1 was encoded as the DER of a different OID (here rsaEncryption, 1.2.840.113549.1.1.1). This is an incomplete fix of CVE-2025-66030. Fixed in node-forge 1.4.1.
X.690 section 8.19 encodes the first two arcs of an OID as one subidentifier, 40 * arc1 + arc2, where the first arc is 0, 1 or 2 and the second arc is at most 39 when the first is 0 or 1. asn1.oidToDer() in lib/asn1.js computed that value with no range check and wrote it with putByte(), which keeps only the low 16 bits. Out-of-range first arcs therefore produced the encoding of a different OID: 0.42.840.113549.1.1.1 gives 40 * 0 + 42 = 42 and 4294977127.18.840.113549.1.1.1 wraps to 42, both the first byte of rsaEncryption. The fix for CVE-2025-66030 (GHSA-65ch-62r8-g69g, node-forge 1.3.2) added a 32-bit check for the later arcs only.
Workarounds
Validate OID strings from untrusted input before passing them to node-forge: the first arc must be 0, 1 or 2, and the second arc at most 39 when the first arc is 0 or 1.
Affected software
| Software | Affected versions |
|---|---|
node-forgenpm · osv:npm:node-forge |
|
About node-forge
- Weekly downloads (npm)
- 55,543,907npm, 23 Nov 2026
Vulnerabilities in node-forge
- In our list
- 20
- Published in the last 12 months
- 20
- Critical, last 12 months
- 0
- High, last 12 months
- 7
- Known exploited
- 0
- CVE-2026-125335Forge: Ed25519 signature verification accepts small-order public keysLow 3.7 10 Nov 2026
- CVE-2026-125332Forge: TLS client crash on an unsupported ServerHello compression methodMedium 5.9 10 Nov 2026
- CVE-2026-125333Forge: ReDoS in forge.http response header and cookie trimmingMedium 5.9 10 Nov 2026
- CVE-2026-125334Forge: TLS client crash on a handshake record received without a sessionMedium 5.9 10 Nov 2026
- CVE-2026-118774Forge: Certificate signature verified with the issuer's RSA signature schemeLow 3.7 10 Nov 2026
- CVE-2026-118776Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryptionLow 3.7 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-118775
- GitHub Advisory Database https://github.com/advisories/GHSA-4642-5mcj-2rqw