Skip to content
Heist/ feed
MediumFix available

stream-json has a prototype pollution issue: Assembler writes this.current[this.key] on plain objects

Type: advisorySource: OSV1 source record

### Summary A prototype-pollution vulnerability in stream-json lets attacker-controlled JSON replace a parsed object's prototype. ### Details The streaming JSON parser (StreamValues/StreamObject/jsonc variants) writes keys via plain assignment, so a __proto__ key replaces the parsed object's prototype with attacker-controlled content (verified 3.5.0 npm latest; native JSON.parse twin control stays clean). Parsing untrusted JSON is the contract. Assembler in Assembler.js. ### PoC Run: ```bash node poc-stream-json-proto-injection.mjs ``` Full proof-of-concept source (poc-stream-json-proto-injection.mjs): ```js // stream-json v3.5.0 (npm latest) — local [[Prototype]] replacement via `__proto__` keys // Class: prototype injection in a JSON deserializer (jsonparse/bser/jsonc-parser/plist family) // Root cause: Assembler builds every object as a plain `Object` and writes // `this.current[this.key] = value` (src/core/assembler.js:160,180 — plain assignment, // ToPropertyKey → inherited Object.prototype __proto__ setter fires) // Spec baseline: JSON.parse (CreateDataProperty) → own data property, no prototype change // Run: node poc-stream-json-proto-injection.mjs (from C:/Users/rncb0/AppData/Local/Temp/0day/sj-lab) import { parser } from 'stream-json'; import jsoncParser from 'stream-json/jsonc/Parser.js'; import { streamValues } from 'stream-json/streamers/stream-values.js'; import { streamObject } from 'stream-json/streamers/stream-object.js'; import { Readable } from 'node:stream

Announced Source revision 1
Original source ↗

GHSA-mjw6-4jj6-33hc

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-mjw6-4jj6-33hc

stream-json

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
3.6.0

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "3.6.0"
          }
        ]
      }
    ],
    "package": {
      "name": "stream-json",
      "purl": "pkg:npm/stream-json",
      "ecosystem": "npm"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-mjw6-4jj6-33hc/GHSA-mjw6-4jj6-33hc.json"
    }
  }
]
Related CVEs
CVE-2026-104183

Source reference: /aliases

Publisher severity

medium

Source reference: /severity/0/score

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

Event
#85849 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement