CVE-2026-118776: Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryption
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the affected implementation used decipher.finish(), CBC and ECB modes, PKCS#7 padding to process the relevant input or security decision. node-forge validated only the final byte of PKCS#7 padding during CBC and ECB decryption and accepted zero, oversized, or mismatched padding bytes. Malformed ciphertext could consequently be accepted and up to four plaintext blocks could be silently removed, causing an integrity failure in applications that treated successful decryption as proof of valid padding. This issue is fixed in version 1.4.1.
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
node-forgeto a version that resolves this vulnerability.Fixed in 1.4.1
Event History
Frequently Asked Questions
Which uses are affected?
Applications using node-forge before 1.4.1 are affected when they use decipher.finish() with CBC or ECB mode and PKCS#7 padding to process relevant input or make a security decision.
What must an attacker be able to do?
An attacker must be able to supply malformed ciphertext to the affected decryption path. The integrity impact applies where the application treats successful decryption as evidence that the padding, and therefore the ciphertext, is valid.
What is the practical impact?
Malformed ciphertext may be accepted, and up to four plaintext blocks can be silently removed. This is an integrity failure; the provided severity vector indicates no confidentiality or availability impact.
How should this be remediated?
Upgrade node-forge to version 1.4.1, which fixes the padding validation issue.