CVE-2026-118777

Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie

Published Oct 29, 2026 CVSS 3.1 · 4.8 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability is a prototype pollution flaw (CWE-1321) in node-forge's HTTP client. In versions before 1.4.1, cookie names and paths extracted from Set-Cookie response headers are written directly into plain JavaScript objects. A server can therefore send a Set-Cookie header with a name of "__proto__" or use inherited names such as "constructor" to inject properties onto Object.prototype or overwrite existing ones. If the attacker controls the cookie value, the header can also be used to delete inherited properties. This manipulation of Object.prototype can alter the behavior of all objects that inherit from it, potentially leading to corrupted application logic or unauthorized code execution.

Affected Systems

This flaw affects any application that uses the forge.http client (or the higher‑level forge.xhr interface) in node-forge prior to version 1.4.1. The vulnerability is not present in applications that do not invoke forge.http, even if they depend on node-forge elsewhere. Users of digitalbazaar:forge, any Node.js project that includes forge.http cookie handling, are impacted until they update to v1.4.1 or later.

Risk and Exploitability

The CVSS score of 4.8 indicates a moderate impact. The exploitability is constrained to scenarios where an application makes HTTP requests via forge.http and processes Set-Cookie headers from a reachable server. An attacker can host a malicious server that sends a Set-Cookie header with the name "__proto__" or other injected property names. Public exploitation evidence is not available, and the vulnerability is not listed in CISA's KEV catalog. Because the attack requires a server that the application contacts, it is a remote network‑based vector that does not depend on local privilege escalation or kernel vulnerabilities. The EPSS score of <1% indicates an extremely low probability of exploitation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the node-forge library to version 1.4.1 or later to eliminate the prototype pollution from cookie handling.
  • If an immediate upgrade is not possible, avoid using forge.http or forge.xhr for HTTP requests that process Set-Cookie headers, and replace them with a different HTTP client that does not perform prototype pollution.
  • As an interim guard, sanitize or explicitly filter cookie names in forge.http responses, discarding "__proto__", "constructor", and other inherited property names before they are stored on the JavaScript object.

Generated by OpenCVE AI on November 6, 2026 at 02:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6wvx-3r32-xmcg Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
History
Type Values Removed Values Added
CPEs cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Digitalbazaar
Digitalbazaar forge
Vendors & Products Digitalbazaar
Digitalbazaar forge
Type Values Removed Values Added
Description 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.
Title Forge: Prototype Pollution in forge.http cookie handling via a malicious Set-Cookie
Weaknesses CWE-1321
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L'}

Weaknesses
  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

  • CWE-915

    Improperly Controlled Modification of Dynamically-Determined Object Attributes

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 30, 2026, 5:12 PM
Reserved
Oct 28, 2026, 7:20 PM
Status
Analyzed
Published
Oct 29, 2026, 7:17 PM
Modified
Nov 4, 2026, 4:49 PM
Severity
Moderate
Public date
Oct 29, 2026, 6:42 PM