CVE-2026-118777
Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
4.8
Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
- Record
CVE-2026-118777- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - Weakness
- CWE-1321
- Updated
- 2026-11-02
EUVDEUVD-2026-113335
4.8
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
- Record
EUVD-2026-113335- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-6wvx-3r32-xmcg
4.8
Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
Summary
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.
Details
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__']returnedObject.prototype, and the cookie path was written as a newObject.prototypeproperty, visible on every object; - a cookie named
constructorwrote onto the globalObjectfunction the same way; - a cookie with an empty value calls
client.removeCookie(name, path), which used the sameinchecks and thendelete client.cookies[name][path], soSet-Cookie: __proto__=; path=toStringdeletedObject.prototype.toString. This path skipped the cookie's secure-flag and domain checks, so it also worked forhttp://clients.
forge.http is not loaded by require('node-forge'). It is included in the forge.all browser bundle and is used with a socket pool, for example by forge.xhr.
The fix uses own-property checks for the cookie store and ignores cookies named __proto__ or with the path __proto__.
Patches
Fixed in node-forge 1.4.1. Cookies from a server can no longer add or remove properties of Object.prototype or Object.
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.
Credits
Reported by @arunmozhivarman-dtx and @Dremig.
Proof of concept
A server response for a forge.http client (http.createClient({url: 'https://...', socketPool: ...})) containing:
Set-Cookie: __proto__=evil; path=polluted
On 1.4.0, after the client processes the response, ({}).polluted is the cookie object. With Set-Cookie: __proto__=; path=toLocaleString, Object.prototype.toLocaleString is deleted (for http:// and https:// clients). On 1.4.1 these cookies are ignored and Object.prototype is unchanged.
Regression tests are in tests/security/ghsa-6wvx-3r32-xmcg.js.
Impact
Applications that use the forge.http client (directly, or through forge.xhr in the forge.all browser bundle) against a server that can be malicious are affected. The server can add properties to Object.prototype and Object for the whole JavaScript realm, which can change application logic that reads properties from plain objects, and can delete built-in Object.prototype methods, breaking the page or process. Applications that don't use forge.http are not affected.
- Record
GHSA-6wvx-3r32-xmcg- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - Weakness
- CWE-1321
- Updated
- 2026-11-02
NVD
4.8
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
- Record
CVE-2026-118777- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L - Weakness
- CWE-1321
- Updated
- 2026-11-04
OSV
4.8
Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
- Record
CVE-2026-118777- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - Weakness
- CWE-1321
- Updated
- 2026-11-05
OSVGHSA-6wvx-3r32-xmcg
4.8
Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
Summary
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.
Details
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__']returnedObject.prototype, and the cookie path was written as a newObject.prototypeproperty, visible on every object; - a cookie named
constructorwrote onto the globalObjectfunction the same way; - a cookie with an empty value calls
client.removeCookie(name, path), which used the sameinchecks and thendelete client.cookies[name][path], soSet-Cookie: __proto__=; path=toStringdeletedObject.prototype.toString. This path skipped the cookie's secure-flag and domain checks, so it also worked forhttp://clients.
forge.http is not loaded by require('node-forge'). It is included in the forge.all browser bundle and is used with a socket pool, for example by forge.xhr.
The fix uses own-property checks for the cookie store and ignores cookies named __proto__ or with the path __proto__.
Patches
Fixed in node-forge 1.4.1. Cookies from a server can no longer add or remove properties of Object.prototype or Object.
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.
Credits
Reported by @arunmozhivarman-dtx and @Dremig.
Proof of concept
A server response for a forge.http client (http.createClient({url: 'https://...', socketPool: ...})) containing:
Set-Cookie: __proto__=evil; path=polluted
On 1.4.0, after the client processes the response, ({}).polluted is the cookie object. With Set-Cookie: __proto__=; path=toLocaleString, Object.prototype.toLocaleString is deleted (for http:// and https:// clients). On 1.4.1 these cookies are ignored and Object.prototype is unchanged.
Regression tests are in tests/security/ghsa-6wvx-3r32-xmcg.js.
Impact
Applications that use the forge.http client (directly, or through forge.xhr in the forge.all browser bundle) against a server that can be malicious are affected. The server can add properties to Object.prototype and Object for the whole JavaScript realm, which can change application logic that reads properties from plain objects, and can delete built-in Object.prototype methods, breaking the page or process. Applications that don't use forge.http are not affected.
- Record
GHSA-6wvx-3r32-xmcg- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - Weakness
- CWE-1321
- Updated
- 2026-11-02
Show 6 moreShow less
OSVUBUNTU-CVE-2026-118777
4.8
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
- Record
UBUNTU-CVE-2026-118777- CVSS 3.1
- 4.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L - Updated
- 2026-11-06
OSVAZL-112511 No score
CVE-2026-118777 affecting package python-tensorboard 2.16.2-6
Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, the forge.http client stored cookie names and paths from Set-Cookie response headers in ordinary JavaScript objects. A malicious server could use the cookie name proto so that the attacker-controlled cookie path was written as a property on Object.prototype, or use inherited names such as constructor to modify Object. An empty cookie value could use the removal path to delete an inherited Object.prototype property. Applications using forge.http directly or through forge.xhr are affected; applications that do not use forge.http are unaffected. This issue is fixed in version 1.4.1.
- Record
AZL-112511- Updated
- 2026-11-05
OSVCLSA-2026-1793790288 No score
TuxCare security update for node-forge (10 CVEs)
TuxCare rebuilt node-forge to address 10 CVEs. Fixed in 1.3.3-tuxcare.3.
- Record
CLSA-2026-1793790288- Updated
- 2026-11-04
OSVCLSA-2026-1793804252 No score
TuxCare security update for node-forge (4 CVEs)
TuxCare rebuilt node-forge to address 4 CVEs. Fixed in 1.3.1-tuxcare.3.
- Record
CLSA-2026-1793804252- Updated
- 2026-11-04
OSVCLSA-2026-1793811764 No score
TuxCare security update for node-forge (4 CVEs)
TuxCare rebuilt node-forge to address 4 CVEs. Fixed in 0.10.0-tuxcare.9.
- Record
CLSA-2026-1793811764- Updated
- 2026-11-04
OSVCLSA-2026-1793829020 No score
TuxCare security update for node-forge (5 CVEs)
TuxCare rebuilt node-forge to address 5 CVEs. Fixed in 0.9.0-tuxcare.2.
- Record
CLSA-2026-1793829020- Updated
- 2026-11-05
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
node-forgenpm |
through 1.4.0 | 1.4.1 |
python-tensorboardAzure Linux:3 |
through 2.16.2-6 | None known |
node-forgeTuxCare:npm From an advisory covering 10 CVEs |
1.3.3-tuxcare.0 up to 1.3.3-tuxcare.3, plus listed versions 1.3.31.3.3-tuxcare.11.3.3-tuxcare.2 |
1.3.3-tuxcare.3 |
node-forgeTuxCare:npm From an advisory covering 4 CVEs |
1.3.1-tuxcare.0 up to 1.3.1-tuxcare.3, plus listed versions 1.3.11.3.1-tuxcare.11.3.1-tuxcare.2 |
1.3.1-tuxcare.3 |
node-forgeTuxCare:npm From an advisory covering 4 CVEs |
0.10.0-tuxcare.0 up to 0.10.0-tuxcare.9, plus listed versions 0.10.00.10.0-tuxcare.10.10.0-tuxcare.20.10.0-tuxcare.30.10.0-tuxcare.4 Show 4 moreShow less0.10.0-tuxcare.50.10.0-tuxcare.60.10.0-tuxcare.70.10.0-tuxcare.8 |
0.10.0-tuxcare.9 |
node-forgeTuxCare:npm From an advisory covering 5 CVEs |
0.9.0-tuxcare.0 up to 0.9.0-tuxcare.2, plus listed versions 0.9.00.9.0-tuxcare.1 |
0.9.0-tuxcare.2 |
node-forgenpm |
before 1.4.1 | 1.4.1 |
node-node-forgeUbuntu:20.04:LTS |
All versions, plus listed versions 0.8.5~dfsg-20.9.1~dfsg-1 |
None known |
node-node-forgeUbuntu:22.04:LTS |
All versions, plus listed versions 0.10.0~dfsg-31.2.1~dfsg-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| affected, aliases | OSV | |
| affected, aliases | OSV | |
| references | NVD | |
| affected, aliases, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-118777 is a medium vulnerability (CVSS 4.8) in Digitalbazaar Forge, published October 29, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 20th percentile. Fixed in node-forge 1.4.1.
References
github.com/digitalbazaar/forge/security/advisories/GHSA-6wvx-3r32-xmcg
github.com/digitalbazaar/forge/commit/797c3f816a22748a96fceebb34eb3a6716853991
github.com/digitalbazaar/forge/releases/tag/v1.4.1
nvd.nist.gov/vuln/detail/CVE-2026-118777
github.com/advisories/GHSA-6wvx-3r32-xmcg
github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118777.json
github.com/digitalbazaar/forge
ubuntu.com/security/CVE-2026-118777
cve.org/CVERecord?id=CVE-2026-118777