Skip to main content
Vulnerability Database/CVE-2026-104183

CVE-2026-104183: stream-json Privilege Escalation Vulnerability

CVE-2026-104183 is a privilege escalation flaw in stream-json that allows prototype replacement through malicious JSON input. Attackers can manipulate authorization decisions by injecting __proto__ keys. This article covers technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104183 Overview

CVE-2026-104183 is a prototype pollution vulnerability in stream-json, a Node.js micro-library for streaming JSON and JSONC processing. Versions prior to 3.6.0 contain an Assembler component that materializes object properties using plain assignment. An input key named __proto__ invokes the inherited setter and replaces the parsed object's prototype rather than creating an own data property. Applications that read authorization or feature flags from inherited values can consume attacker-controlled properties. A null prototype can also disrupt code that depends on Object.prototype methods. The global Object.prototype itself is not polluted. The issue is fixed in stream-json version 3.6.0 [CWE-1321].

Critical Impact

Parsing JSON containing a __proto__ key with vulnerable stream-json versions can replace per-object prototypes, enabling logic bypass in applications that trust inherited properties.

Affected Products

  • stream-json npm package versions prior to 3.6.0
  • Node.js applications using the Assembler component to materialize parsed objects
  • Downstream libraries bundling stream-json in JSON processing pipelines

Discovery Timeline

  • 2026-10-01 - CVE-2026-104183 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-104183

Vulnerability Analysis

The stream-json library streams JSON tokens into application code using a SAX-inspired API. The Assembler component reconstructs full JavaScript objects from the token stream. When assembling an object, it assigns each parsed key to the target object using plain property assignment. JavaScript treats assignment to __proto__ as a call to the inherited setter on Object.prototype, which replaces the target object's [[Prototype]] instead of creating an own property named __proto__.

An attacker who supplies JSON such as {"__proto__": {"isAdmin": true}} causes the assembled object to inherit from the attacker-controlled object. Applications that read obj.isAdmin without a hasOwnProperty check receive the injected value. Supplying {"__proto__": null} strips the prototype chain and breaks calls like obj.hasOwnProperty(...) or obj.toString().

Root Cause

The root cause is unsafe property materialization inside Assembler. The code uses direct assignment (target[key] = value) without filtering reserved keys or using Object.defineProperty with an own data descriptor. The maintainer scoped the project to trusted inputs (local dumps, exports, logs), while the reporter treats parsing untrusted JSON as part of the library contract, which drives the local attack vector classification.

Attack Vector

Exploitation requires the application to pass attacker-influenced JSON through stream-json's Assembler and then make trust decisions based on inherited properties of the resulting object. The attack vector is local because the documented intended inputs are files and dumps owned by the operator. Applications that forward untrusted network JSON into the pipeline widen the exposure.

text
// Patch excerpt from stream-json 3.6.0 documentation (llms-full.txt)
+**Intended input:** data you own or trust — database dumps, exports,
+logs, files produced by your own systems. `stream-json` is not designed
+for hostile input: do not feed it JSON from the open internet or from
+untrusted users; untrusted JSON needs validation of its own before it
+reaches a pipeline.
// Source: https://github.com/uhop/stream-json/commit/2f2d35bbb547306991ded6487a279154d865a358

Detection Methods for CVE-2026-104183

Indicators of Compromise

  • JSON payloads containing the literal key "__proto__" reaching Node.js services that use stream-json.
  • Runtime errors from calls to Object.prototype methods such as hasOwnProperty or toString on assembled objects.
  • Unexpected authorization decisions or feature-flag states following ingestion of externally sourced JSON files.

Detection Strategies

  • Perform a software composition analysis scan for stream-json versions below 3.6.0 across package manifests and lockfiles.
  • Add static analysis rules that flag use of Assembler without downstream Object.create(null) or hasOwnProperty guards.
  • Inspect ingestion logs for JSON records containing __proto__, constructor, or prototype keys as suspicious inputs.

Monitoring Recommendations

  • Monitor Node.js process logs for TypeError exceptions involving missing prototype methods on parsed objects.
  • Track npm audit and GitHub Dependabot alerts referencing GHSA-mjw6-4jj6-33hc.
  • Alert on anomalous authorization grants or role elevations occurring shortly after JSON import jobs.

How to Mitigate CVE-2026-104183

Immediate Actions Required

  • Upgrade stream-json to version 3.6.0 or later across all Node.js services and build artifacts.
  • Audit application code that consumes Assembler output for property lookups that trust inherited values.
  • Restrict JSON inputs to trusted, locally owned sources as the maintainer specifies in the updated documentation.

Patch Information

The fix is shipped in stream-jsonv3.6.0. Review the upstream commit and the GitHub Security Advisory GHSA-mjw6-4jj6-33hc for details. Update the dependency in package.json and regenerate the lockfile.

Workarounds

  • Validate incoming JSON and reject payloads containing __proto__, constructor, or prototype keys before parsing.
  • Replace trust-sensitive object lookups with Object.hasOwn(obj, key) or construct targets using Object.create(null).
  • Isolate JSON ingestion pipelines so that untrusted data never reaches a stream-jsonAssembler instance.
bash
# Upgrade stream-json to the patched release
npm install stream-json@^3.6.0
npm ls stream-json
# Verify no transitive dependency pins a vulnerable version
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.