home / blog
2026-10-31 · low
CVE-2026-118776: Defective padding validation in node-forge
Incomplete PKCS#7 padding validation in node-forge: forged data could be accepted as valid.

CVE-2026-118776 affects node-forge, a JavaScript library implementing TLS. The vulnerability resides in decipher.finish() on CBC and ECB modes: PKCS#7 padding validation is incomplete. The code checks only the last byte instead of validating the entire padding sequence. This permits acceptance of forged ciphertext, silently removing up to 4 plaintext blocks and compromising data integrity.
Official CVSS is 3.7, classified as LOW. Practical impact is contained because it depends on applications treating successful decryption as integrity validation. The flaw has been fixed in node-forge 1.4.1, available since late June 2026. A GitHub advisory was published October 30, the day after NVD publication on October 29, confirming source coherence.
IT teams and system administrators must immediately verify if node-forge is used as a direct or indirect dependency (it is downloaded 53 million times per week). Updating to version 1.4.1 or later is priority for applications using CBC or ECB modes. If immediate update is not possible, document the risk and plan the upgrade within 30 days. Review dependency changelogs to confirm the version in production.
At a glance
- What
- node-forge is a JavaScript TLS implementation. The flaw resides in decipher.finish() on CBC and ECB modes, where PKCS#7 padding validation is incomplete: it checks only the final byte instead of the complete sequence. This permits acceptance of forged ciphertext, silently removing up to 4 plaintext blocks and compromising data integrity.
- Severity
- CVSS 3.7 (LOW). Practical impact is contained: it affects applications treating successful decryption as integrity validation. The vulnerability would enable silent corruption of up to 4 plaintext blocks. However, access is typically constrained and impact depends on configuration.
- Affected versions
- All versions prior to 1.4.1. Official documentation does not specify granular ranges, but the fix was introduced in 1.4.1, available since late June 2026.
- Fix
- Update node-forge to version 1.4.1 or later. The patch corrects full PKCS#7 padding sequence validation in CBC and ECB modes.
- Status
- Vulnerability confirmed and fixed. CVE published on NVD October 29, 2026. GitHub advisory October 30, 2026. Coherence between sources confirms reporting reliability.
- Action
- Immediately verify node-forge dependencies (53 million downloads per week). Update to 1.4.1+ for applications using CBC or ECB modes. If immediate update is not feasible, document the risk and plan upgrade within 30 days. Check production version via logs.
Sources: NVD, CVE-2026-118776