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

CVE-2026-86536: Apache Thrift Prototype Pollution Vulnerability

CVE-2026-86536 is a prototype pollution flaw in Apache Thrift JavaScript bindings that allows attackers to modify object prototype attributes. This post explains its impact, affected versions, 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-86536 Overview

CVE-2026-86536 is a prototype pollution vulnerability affecting all JavaScript bindings in Apache Thrift versions prior to 0.25.0. The flaw allows attackers to modify object prototype attributes through improperly controlled property assignments in generated Thrift JS code. Apache Thrift is a widely used cross-language serialization and remote procedure call (RPC) framework, so any JavaScript client or server consuming untrusted Thrift payloads is exposed. The issue is tracked under CWE-1321 and fixed in version 0.25.0, which also requires regeneration of JavaScript code.

Critical Impact

Attackers can pollute the JavaScript Object.prototype across any application that deserializes untrusted Thrift messages, enabling downstream integrity attacks against application logic.

Affected Products

  • Apache Thrift JavaScript bindings (all variants) prior to version 0.25.0
  • Node.js applications using Thrift-generated JS clients or servers
  • Browser-side applications consuming Thrift serialized objects

Discovery Timeline

  • 2026-10-02 - CVE-2026-86536 published to the National Vulnerability Database (NVD)
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-86536

Vulnerability Analysis

The vulnerability resides in the JavaScript code that Apache Thrift generates from .thrift interface definitions. When deserializing an incoming Thrift message, the generated code assigns fields to target objects without filtering reserved property names such as __proto__, constructor, or prototype. An attacker who controls a Thrift payload can therefore set attributes on Object.prototype, affecting every object in the running JavaScript process.

Prototype pollution does not itself execute code, but it can escalate into authentication bypass, privilege escalation, denial of service, or remote code execution depending on how the host application consumes object properties. The attack is remote and requires no authentication, though exploitation depends on specific application conditions that process attacker-controlled Thrift data.

Root Cause

The root cause is improperly controlled modification of object prototype attributes [CWE-1321] in the Thrift JavaScript code generator. Field names arriving in a Thrift message are used as keys when populating target objects, with no allow-list or Object.create(null) safeguard. Because every JavaScript binding (Node.js, browser, TypeScript targets) shares the same generator pattern, the defect propagates uniformly across all generated clients and servers.

Attack Vector

Exploitation occurs over the network. An attacker sends a crafted Thrift message, in any supported transport or protocol, containing field keys that resolve to prototype chain properties. When the generated JavaScript parser processes the message, it writes attacker-chosen values into Object.prototype. Subsequent legitimate code that reads properties from freshly created objects then observes attacker-controlled values. The vulnerability is described in prose only; see the Apache Mailing List Discussion and Apache Mailing List Update for technical specifics.

Detection Methods for CVE-2026-86536

Indicators of Compromise

  • Thrift request payloads containing field names matching __proto__, constructor, or prototype
  • Unexpected properties appearing on plain JavaScript objects at runtime, especially after processing RPC traffic
  • Application errors referencing properties the codebase never defines, indicating prototype chain tampering

Detection Strategies

  • Perform software composition analysis to identify Apache Thrift bindings earlier than 0.25.0 in Node.js and front-end dependency trees
  • Inspect generated Thrift JS artifacts in source control for deserialization logic that assigns fields without key filtering
  • Deploy runtime guards that freeze Object.prototype in non-production environments to surface pollution attempts during testing

Monitoring Recommendations

  • Log and alert on Thrift message fields whose keys match reserved prototype identifiers
  • Monitor Node.js process telemetry for unexpected property reads on newly instantiated objects
  • Correlate RPC error spikes with recent Thrift payload patterns to identify probing activity

How to Mitigate CVE-2026-86536

Immediate Actions Required

  • Upgrade Apache Thrift to version 0.25.0 or later across all services that build or consume JavaScript bindings
  • Regenerate all JavaScript code from .thrift IDL files after upgrading, since shipped generated code retains the vulnerable pattern
  • Audit internet-facing services for exposed Thrift endpoints and restrict access to trusted callers until patching is complete

Patch Information

The Apache Thrift project fixed the issue in version 0.25.0. Upgrading the library alone is insufficient. Developers must re-run the Thrift compiler to produce patched JavaScript bindings and redeploy applications. Review the Apache Mailing List Update for official guidance.

Workarounds

  • Validate and reject Thrift message field names containing __proto__, constructor, or prototype at the application boundary
  • Use Object.freeze(Object.prototype) during application startup to block prototype mutation at runtime
  • Instantiate deserialization targets with Object.create(null) where feasible to eliminate prototype inheritance
bash
# Upgrade Apache Thrift and regenerate JS bindings
npm install thrift@0.25.0
thrift --gen js:node path/to/service.thrift
thrift --gen js path/to/service.thrift

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.