---
id: "CVE-2026-118777"
kind: "vulnerability"
aliases: ["CVE-2026-118777"]
title: "node-forge: malicious server can poison JavaScript object prototypes via cookies"
severity: "medium"
cvss: 4.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["javascript", "node-forge", "npm", "package"]
not_affected_if: ["no-forge-http", "no-forge-xhr"]
published_at: "2026-10-29T19:17:20+00:00"
first_seen_at: "2026-10-29T19:26:47+00:00"
updated_at: "2026-10-29T19:27:32+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118777", "first_seen_at": "2026-10-29T19:26:47+00:00"}]
---

# node-forge: malicious server can poison JavaScript object prototypes via cookies

Prior to 1.4.1, the forge.http client stored cookie names from Set-Cookie headers in plain JavaScript objects, so a malicious server could write attacker-chosen properties onto Object.prototype. The sources do not say what code paths beyond prototype modification an attacker can reach.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version of `node-forge` with `npm ls node-forge` and look for any version below `1.4.1`.
- Search the project for imports of `forge.http` or `forge.xhr`, which are the affected components.

## Fix

- `node-forge` `1.4.1`

## Timeline

- 2026-10-29T19:26:47+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118777

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
