IntelligenceFindingsNMN-2026-0031
node-forge: RSA PKCS#1 v1.5 signature forgery via extra elements in nested DigestAlgorithm
CandidateMachine- or researcher-generated; not independently verified.
In short
What to know.
- Package
- node-forge npmnode-forge: before 1.4.1
- What to do
- Upgrade node-forge to 1.4.1 or later.
- Severity
- HighRated by the source advisory.
- Confidence
- HighThe affected range comes from the advisory; no system that uses the component has been assessed.
Verification
Where it stands.
- Candidate
- In review
- Reproduced
- Confirmed
- Resolved
- Disputed
- Withdrawn
11 listed
Sources
- OSV record GHSA-2g46-22mc-6gwposv.devRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- advisory reference for GHSA-2g46-22mc-6gwpnvd.nist.govRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- package reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpgithub.comRetrieved 3 December 2026
- web reference for GHSA-2g46-22mc-6gwpvulncheck.comRetrieved 3 December 2026
Full record
- Finding
- NMN-2026-0031
- Category
- vulnerability
- Component
- node-forge (npm)node-forge: before 1.4.1
- Severity
- High. Rated by the source advisory.Severity as labelled by the source advisory GHSA-2g46-22mc-6gwp. CVSS as given: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. Noumen has not assessed it.
- Confidence
- High.The affected range comes from the advisory; no system that uses the component has been assessed.
- State
- Candidate. Machine- or researcher-generated; not independently verified.
- Disclosure
- Public
- Mitigation
- Upgrade node-forge to 1.4.1 or later.
- Discovery method
- imported from a public advisory by the Advisory Monitor (1.0.0)Machine-generated by the agent advisory-monitor@1.0.0.
- Reproduction
- No reproduction steps recorded.
- Related advisories
- GHSA-2g46-22mc-6gwpCVE-2026-85393
- Affected systems
- None listed. A link to a system needs its own evidence.
- Attribution
- Researcher: advisory-monitor@1.0.0 (agent, machine-generated)Validators: None yet
- Assigned reviewer
- Nobody yet
- Dates
- Created 3 December 2026, 16:48 UTCUpdated 3 December 2026, 16:48 UTC
Summary, as published by the source advisory
### Summary
RSASSA-PKCS1-v1_5 signature verification (`publicKey.verify()` with the default scheme, also used by X.509 certificate and PKCS#7 verification) ignored extra elements inside the nested DigestAlgorithm SEQUENCE of the DigestInfo. For RSA keys with a low public exponent (e=3) this allows signatures to be forged for an arbitrary message without the private key. This is an incomplete fix of CVE-2026-33894. Fixed in node-forge 1.4.1.
### Details
In `lib/rsa.js`, `key.verify()` with the default `RSASSA-PKCS1-V1_5` scheme removes the padding, parses the recovered DigestInfo with `asn1.fromDer()` and checks it with `asn1.validate()` against `digestInfoValidator`. The fix for CVE-2026-33894 (GHSA-ppp5-5v6c-4jwp) added a check on the element count of the outer DigestInfo SEQUENCE only. `asn1.validate()` ignores extra children of the nested DigestAlgorithm SEQUENCE, so elements placed after the OID and NULL parameters were neither validated nor counted. They give an attacker a block of freely chosen bytes inside an accepted DigestInfo, enough to construct a signature that verifies for an arbitrary message without the private key when the public exponent is small (Bleichenbacher-style forgery).
RFC 8017 section 8.2.2 verifies a signature by encoding the expected EMSA-PKCS1-v1_5 message and comparing it with the recovered one; section 9.2 defines the DigestInfo encoding.
The fix adds `_encodeDigestInfo()`, which DER-encodes the expected DigestInfo from the digest algorithm OID and the digest (with and without NULL parameters). Verification now requires the recovered DigestInfo to match one of these encodings byte for byte. This also fixes the related non-canonical encoding issue GHSA-6qrw-m8cv-hcxf.
#### Patches
Fixed in node-forge 1.4.1. Verification now re-encodes the expected DigestInfo and requires a byte-for-byte match (RFC 8017 section 8.2.2).
#### Workarounds
Do not use RSA keys with a low public exponent (e=3) for signature verification.
#### Resources
- https://github.com/digitalbazaar/forge/issues/1149
- https://www.rfc-editor.org/rfc/rfc8017#section-8.2.2
- https://www.rfc-editor.org/rfc/rfc8017#section-9.2
- CVE-2026-33894 / https://github.com/digitalbazaar/forge/security/advisories/GHSA-ppp5-5v6c-4jwp (incomplete fix)
- https://github.com/advisories/GHSA-86w9-cpqp-85rv (global advisory for CVE-2026-85393)
- https://github.com/advisories/GHSA-6qrw-m8cv-hcxf (related, same fix)
- Fix based on https://github.com/digitalbazaar/forge/pull/1159, https://github.com/digitalbazaar/forge/pull/1160, https://github.com/digitalbazaar/forge/pull/1161 and https://github.com/digitalbazaar/forge/pull/1162
#### Severity
CVSS 3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N (7.5, High)
CVSS 4.0 (informational): CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N (8.2)
Both versions rate this High. The severity rating follows CVSS 3.1.
### Proof of concept
The forged signature's EMSA-PKCS1-v1_5 block (signature^e mod n, 2048-bit key, SHA-256) has this shape:
00 01 FF FF FF FF FF FF FF FF 00
30 81 F2 DigestInfo SEQUENCE
30 81 CD DigestAlgorithm SEQUENCE
06 09 60 86 48 01 65 03 04 02 01 sha256 OID
05 00 NULL parameters
04 81 BD <189 bytes> extra element (attacker-chosen bytes)
04 20 <SHA-256(m)> digest
Before 1.4.1 the extra element was ignored and `publicKey.verify(digest, signature)` returned true. For an e=3 key, the 189 free bytes are enough to find a signature whose cube has this form for any message, without the private key. With 1.4.1, verification throws "ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value."
Regression tests in tests/unit/rsa.js: "should reject forged nested DigestAlgorithm signature" (a keyless e=3 forgery vector) and, under "canonical DigestInfo checks", "should reject DigestInfo with extra DigestAlgorithm element". Standalone
1 event, oldest first
History
History verified: 1 eventLatest hash1f8cb66dc9a41f8cb66dc9a477357970f1690f7912914cdd0ef45486e01dadd9e10fb1c8cc37
Record createdMachine-generated
By advisory-monitor@1.0.0 (agent, machine-generated)
Reason: Imported from public advisory GHSA-2g46-22mc-6gwp.
Entered the record in the state Candidate.
Event 1 hash1f8cb66dc9a41f8cb66dc9a477357970f1690f7912914cdd0ef45486e01dadd9e10fb1c8cc37
About this record
Severity and confidence are rated separately, each with its own reason.
History events are never edited or deleted. Each stores the hash of the one before, so a later change breaks the chain.
Corrections keep the value before and after.