{"id":"CVE-2026-118777","kind":"vulnerability","aliases":["CVE-2026-118777"],"related":[],"title":"node-forge: malicious server can poison JavaScript object prototypes via cookies","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.","summary":"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.","severity":"medium","cvss":4.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["javascript","node-forge","npm","package"],"not_affected_if":["no-forge-http","no-forge-xhr"],"how_to_check":"- Check the installed version of `node-forge` with `npm ls node-forge` and look for any version below `1.4.1`.\n- Search the project for imports of `forge.http` or `forge.xhr`, which are the affected components.","fix":"- `node-forge` `1.4.1`","status":"open","published_at":"2026-10-29T19:17:20+00:00","first_seen_at":"2026-10-29T19:26:47+00:00","triaged_at":"2026-10-29T19:27:32+00:00","updated_at":"2026-10-29T19:27:32+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-29T19:27:32Z","model":"claude-haiku-5-5","output":{"fix":"- `node-forge` `1.4.1`","reach":"network","title":"node-forge: malicious server can poison JavaScript object prototypes via cookies","impact":"medium","summary":"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.","audience":"developers","category":"package","nicknames":[],"who_cares":["node-forge","javascript","npm"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Object prototype polluted by a malicious server's cookie response","analyst_note":"","how_to_check":"- Check the installed version of `node-forge` with `npm ls node-forge` and look for any version below `1.4.1`.\n- Search the project for imports of `forge.http` or `forge.xhr`, which are the affected components.","plain_action":"","needs_analyst":false,"not_affected_if":["no-forge-http","no-forge-xhr"],"who_is_affected":"Only applications that use forge.http directly or through forge.xhr are affected, and only when they talk to a server that can send Set-Cookie headers. Applications that do not use forge.http are unaffected. Exposure is tied to the client-side cookie handling, so a team that only uses node-forge for cryptographic primitives can skip it.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000696,"input_tokens":4246,"output_tokens":543,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-118777':15A,18A '-2026':14A,17A '1.4.1':27B,88C,179C 'affect':164C 'also':71C 'applic':156C,165C 'attack':50B,67B,120C 'attacker-chosen':49B 'attacker-control':119C 'beyond':63B 'call':72C 'chosen':51B 'client':30B,91C 'code':61B 'constructor':137C 'control':121C 'cooki':12A,32B,37B,93C,100C,113C,122C,143C 'could':47B,110C,145C 'cve':13A,16A 'delet':151C 'direct':159C 'empti':142C 'fix':176C 'forg':3A,22B,70C,75C 'forge.http':29B,90C,158C,170C 'forge.xhr':162C 'header':38B,102C 'implement':79C 'inherit':133C,153C 'issu':174C 'javascript':8A,19B,41B,85C,105C 'layer':82C 'malici':4A,45B,108C 'modif':65B 'modifi':139C 'name':33B,94C,114C,134C 'nativ':78C 'node':2A,21B,74C 'node-forg':1A,20B,73C 'npm':23B 'object':9A,42B,106C,140C 'object.prototype':54B,130C,154C 'onto':53B 'ordinari':104C 'packag':24B 'path':62B,96C,123C,149C 'plain':40B 'poison':7A 'prior':25B,86C 'properti':52B,128C,155C 'proto':115C 'prototyp':10A,64B 'reach':69B 'remov':148C 'respons':101C 'say':59B 'secur':83C 'server':5A,46B,109C 'set':36B,99C 'set-cooki':35B,98C 'sourc':56B 'store':31B,92C 'transport':81C 'unaffect':172C 'use':111C,132C,146C,157C,169C 'valu':144C 'version':178C 'via':11A 'write':48B 'written':125C","nicknames":[],"mitigations":[],"who_affected":"Only applications that use forge.http directly or through forge.xhr are affected, and only when they talk to a server that can send Set-Cookie headers. Applications that do not use forge.http are unaffected. Exposure is tied to the client-side cookie handling, so a team that only uses node-forge for cryptographic primitives can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-29T19:17:20+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118777","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118777","severity":null,"published_at":"2026-10-29T19:17:20+00:00","modified_at":"2026-10-29T19:17:20+00:00","first_seen_at":"2026-10-29T19:26:47+00:00","fetched_at":"2026-10-29T19:26:47+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}