{"id":"GHSA-2vgq-wchc-25w7","revision":null,"records":[{"revision":"bae6fb82cd834d3bb5589648e08c52ba","observedAt":"2026-11-04T02:57:16.741+00:00","statement":{"source":"cve-program","id":"CVE-2026-118776","aliases":[],"title":"Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryption","description":"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.","state":0,"publishedAt":"2026-10-29T18:37:32.362+00:00","modifiedAt":"2026-11-04T01:36:02.05+00:00","affected":[{"ecosystem":"Vendor product","name":"forge","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"digitalbazaar\",\n                    \"product\": \"forge\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 1.4.1\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"severity":"LOW"}],"references":["https://github.com/digitalbazaar/forge/security/advisories/GHSA-2vgq-wchc-25w7","https://github.com/digitalbazaar/forge/commit/81774ff99e2da64aec9a43591df45a360040c136","https://github.com/digitalbazaar/forge/releases/tag/v1.4.1"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-118776","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-118776","identifiers":["CVE-2026-118776"]},"retained":false,"historicalAffected":[]},{"revision":"70c2392a490e4299ac816c73e8859465","observedAt":"2026-11-14T17:37:48.24+00:00","statement":{"source":"euvd","id":"EUVD-2026-113333","aliases":["CVE-2026-118776","GHSA-2vgq-wchc-25w7"],"title":"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 secu…","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"severity":null}],"references":["https://github.com/digitalbazaar/forge/security/advisories/GHSA-2vgq-wchc-25w7","https://github.com/digitalbazaar/forge/commit/81774ff99e2da64aec9a43591df45a360040c136","https://github.com/digitalbazaar/forge/releases/tag/v1.4.1"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-113333","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 29, 2026, 6:37:32 PM","dateUpdated":"Nov 4, 2026, 1:36:02 AM"},"relatedAdvisories":[{"id":"msrc_CVE-2026-118776","title":"Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryption","vulnerabilityIds":["CVE-2026-118776"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-113333","identifiers":["EUVD-2026-113333","CVE-2026-118776","GHSA-2vgq-wchc-25w7"]},"retained":false,"historicalAffected":[]},{"revision":"3523d5ae7df54579b5798d9bf5387521","observedAt":"2026-11-10T16:25:21.717+00:00","statement":{"source":"nvd","id":"CVE-2026-118776","aliases":[],"title":"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 secu…","description":"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.","state":0,"publishedAt":"2026-10-29T19:17:20.147+00:00","modifiedAt":"2026-11-04T16:52:39.17+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"severity":"LOW"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/digitalbazaar/forge/commit/81774ff99e2da64aec9a43591df45a360040c136","https://github.com/digitalbazaar/forge/releases/tag/v1.4.1","https://github.com/digitalbazaar/forge/security/advisories/GHSA-2vgq-wchc-25w7"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-118776","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-20","CWE-354"],"productCriteria":["cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2026-10-29T19:17:20.147","lastModified":"2026-11-04T16:52:39.170"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-118776","identifiers":["CVE-2026-118776"]},"retained":false,"historicalAffected":[]},{"revision":"5e05c36fb5e94397bcd933cdf0416c95","observedAt":"2026-11-10T16:21:51.228+00:00","statement":{"source":"osv","id":"GHSA-2vgq-wchc-25w7","aliases":["CVE-2026-118776"],"title":"Forge: Incomplete PKCS#7 padding validation in AES/DES CBC and ECB decryption","description":"### Summary\n`decipher.finish()` in CBC and ECB mode accepted malformed PKCS#7 padding: only the last byte was checked, against a limit of four blocks, so mismatched padding bytes, a zero count and oversized counts were accepted and up to four blocks of plaintext could be silently removed. Fixed in node-forge 1.4.1.\n\n### Details\n`modes.cbc.prototype.unpad()` and `modes.ecb.prototype.unpad()` in `lib/cipherModes.js` read the last decrypted byte as the PKCS#7 padding count, rejected it only if it was larger than `blockSize << 2` (64 for AES, 32 for DES), and then removed that many bytes. They did not reject a count of 0 or a count larger than one block, and did not check that every padding byte equals the count, as PKCS#7 (RFC 5652 section 6.3) requires. On the Wycheproof AES-CBC-PKCS5 test vectors, 69 of 144 invalid vectors decrypted successfully.\n\nCBC and ECB without a MAC do not provide integrity: an attacker who can modify ciphertext can already make the final block decrypt to any padding. The effect of this bug is that malformed ciphertext is accepted as valid and that oversized counts silently truncate up to four blocks of plaintext. The fix does not protect against padding oracle attacks; applications that decrypt untrusted CBC data need to authenticate it (for example with an HMAC) or use AES-GCM.\n\nThe fix requires a count from 1 to the block size and checks every padding byte. Data with other padding schemes that only use the last byte as the count (ANSI X.923, ISO 10126, XML Encryption) now fails to decrypt with default unpadding; set `decipher.mode.unpad = false` before `finish()` and remove such padding in application code.\n\n#### Patches\nFixed in node-forge 1.4.1. CBC and ECB decryption requires valid PKCS#7 padding.\n\n#### Workarounds\nAuthenticate CBC/ECB ciphertext before decrypting it, or use AES-GCM. To check padding on 1.4.0, set `decipher.mode.unpad = false` and validate the padding in application code.\n\n#### References\n- https://www.rfc-editor.org/rfc/rfc5652#section-6.3 (PKCS#7 content-encryption padding)\n- https://github.com/C2SP/wycheproof/blob/master/testvectors_v1/aes_cbc_pkcs5_test.json\n- https://cwe.mitre.org/data/definitions/354.html (CWE-354: Improper Validation of Integrity Check Value)\n\n#### Severity\nCVSS 3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N (3.7, Low)\nCVSS 4.0 (informational): CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N (6.3)\nCVSS 4.0 rates this Moderate because its integrity weighting is higher; the severity rating follows CVSS 3.1.\n\n#### Credits\nReported by Oren Yomtov (@orenyomtov, Fireblocks), @zebbern, and Brian Lee (@hibrian827, Georgia Tech SSLab, Team Atlanta), who also suggested the fix.\n\n### Proof of concept\n    var forge = require('node-forge');\n    // Wycheproof aes_cbc_pkcs5_test tcId 26: zero padding instead of PKCS#7\n    var d = forge.cipher.createDecipher('AES-CBC',\n      forge.util.hexToBytes('db4f3e5e3795cc09a073fa6a81e5a6bc'));\n    d.start({iv: forge.util.hexToBytes('23468aa734f5f0f19827316ff168e94f')});\n    d.update(forge.util.createBuffer(\n      forge.util.hexToBytes('aa62606a287476777b92d8e4c4e53028')));\n    console.log(d.finish()); // 1.4.0: true; 1.4.1: false\n\nDirectly, `unpad()` on 1.4.0 also accepts a final block ending in `03 02 01 04` (removing 4 bytes) and a count of 0x20 on 16-byte blocks (removing 32 bytes).\n\nRegression tests are in tests/unit/aes.js (\"PKCS#7 padding checks\").\n\n### Impact\nApplications that decrypt AES or DES data in CBC or ECB mode and use the result of `decipher.finish()` to decide whether the data is valid could accept malformed ciphertext, with up to four blocks of trailing plaintext removed. This also affects PKCS#7 EncryptedData/EnvelopedData decryption, PKCS#12 and encrypted private keys. Because CBC and ECB without a MAC are malleable, the additional capability given to an attacker is small. There is no confidentiality or availability impact.","state":0,"publishedAt":"2026-11-10T15:57:46+00:00","modifiedAt":"2026-11-10T16:15:04.1559485+00:00","affected":[{"ecosystem":"npm","name":"node-forge","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.4.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/digitalbazaar/forge/security/advisories/GHSA-2vgq-wchc-25w7","https://nvd.nist.gov/vuln/detail/CVE-2026-118776","https://github.com/digitalbazaar/forge/commit/81774ff99e2da64aec9a43591df45a360040c136","https://github.com/digitalbazaar/forge","https://github.com/digitalbazaar/forge/releases/tag/v1.4.1"],"sourceUrl":"https://github.com/advisories/GHSA-2vgq-wchc-25w7","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-2vgq-wchc-25w7","identifiers":["GHSA-2vgq-wchc-25w7","CVE-2026-118776"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T03:30:47.3393218+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T03:30:47.3393218+00:00","lastSuccessAt":"2026-11-16T03:30:47.5025306+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.5025309+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-8b6e139a850cc2a6b5126012e32ec45c19d4370854306148d5d13635a0c0a1af","complete":true,"records":425878,"lastAttemptAt":"2026-11-16T03:30:46.3350863+00:00","lastSuccessAt":"2026-11-16T03:30:46.3223223+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:46.3350863+00:00","snapshotPublishedAt":"2026-11-16T03:21:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-7f4d8e8cc74e464e8c34a5ac0fac1a36","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T03:41:34.8714449+00:00","lastSuccessAt":"2026-11-16T03:41:34.867+00:00","error":"130 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T03:41:34.867+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13744,"expectedIdentifiers":13874,"failedIdentifiers":130},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T03:30:47.3393218+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T03:30:47.3393218+00:00","lastSuccessAt":"2026-11-16T03:30:47.5032731+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.5032733+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-cb821c14db734923a70a6d3bd1f879f3","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T03:32:46.8084817+00:00","lastSuccessAt":"2026-11-16T03:32:46.807+00:00","error":"100 identifier lookups failed; latest failures include HttpIOException. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T03:32:46.807+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13774,"expectedIdentifiers":13874,"failedIdentifiers":100},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T03:30:47.2794701+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.2794701+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T03:30:46.7173041+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:46.7173041+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T03:30:47.2950864+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.2950864+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-e77c8ea93875d599a3ee92fde74c7150d1a28eacc697b92dc129baff6877c60e","complete":true,"records":232477,"lastAttemptAt":"2026-11-16T03:30:47.1761328+00:00","lastSuccessAt":"2026-11-16T01:07:48.2266333+00:00","error":null,"lastVerifiedAt":"2026-11-16T03:30:47.1761328+00:00","snapshotPublishedAt":"2026-11-16T01:03:09+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}