npm
CVE-2026-118777
Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
- Severity
- Medium 4.8
- Published
- 30 Oct 2026
- Last changed
- 30 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.4.1
- Exploit chance
- 0.4% in the next 30 daysHigher than 34% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Prototype pollution (CWE-1321)
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change some data · Slow it down
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L- Also known as
- GHSA-6wvx-3r32-xmcg
- Sources
- OSV.dev and GitHub
Description
The forge.http client stored cookies from Set-Cookie response headers in a plain object keyed by cookie name and path. A malicious server could use the cookie name proto to add properties to Object.prototype, use inherited names such as constructor to add properties to Object, and send an empty cookie value to delete Object.prototype properties. Fixed in node-forge 1.4.1.
client.setCookie() in lib/http.js stored a cookie with client.cookies[cookie.name][cookie.path] = cookie, creating client.cookies[cookie.name] only when !(cookie.name in client.cookies). Both values come from the server's Set-Cookie header via response.getCookies(). Because in also sees inherited properties:
- a cookie named proto skipped the initialization, client.cookies['proto'] returned Object.prototype, and the cookie path was written as a new Object.prototype property, visible on every object;
- a cookie named constructor wrote onto the global Object function the same way;
- a cookie with an empty value…
Workarounds
Don't use forge.http or forge.xhr with servers that aren't trusted, or filter Set-Cookie headers named proto, constructor or other Object.prototype property names before they reach the client.
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-118777
- GitHub Advisory Database https://github.com/advisories/GHSA-6wvx-3r32-xmcg