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

CVE-2026-25521: Locutus Prototype Pollution Vulnerability

CVE-2026-25521 is a prototype pollution vulnerability in Locutus that allows attackers to pollute Object.prototype via crafted String.prototype input. This article covers technical details, affected versions, and mitigation.

Updated:

CVE-2026-25521 Overview

CVE-2026-25521 is a prototype pollution vulnerability in Locutus, a JavaScript library that ports standard libraries from other programming languages to JavaScript for educational use. The flaw affects versions 2.0.12 through versions prior to 2.0.39. A prior patch attempted to block prototype pollution by rejecting forbidden keys in user input. Attackers can bypass that filter by crafting input that pollutes Object.prototype through String.prototype. The maintainers patched the issue in version 2.0.39. The vulnerability is tracked under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes.

Critical Impact

Successful exploitation enables attackers to modify Object.prototype, which can cascade into denial of service, logic corruption, or arbitrary code execution in applications consuming the library.

Affected Products

  • Locutus locutus versions >=2.0.12 and <2.0.39
  • Node.js applications depending on the locutus npm package within the affected range
  • Downstream packages bundling vulnerable Locutus releases

Discovery Timeline

  • 2026-02-04 - CVE-2026-25521 published to NVD
  • 2026-02-20 - Last updated in NVD database

Technical Details for CVE-2026-25521

Vulnerability Analysis

Locutus exposes JavaScript implementations of standard library functions from other languages. One or more of these helpers walk a user-supplied object or string path and assign values into a target object. The prior remediation introduced a denylist that rejected reserved property names such as __proto__, constructor, or prototype when supplied directly through object keys.

The denylist did not account for property access mediated by String.prototype. By submitting crafted input that traverses through string primitives, attackers reach Object.prototype indirectly. Once the prototype chain is mutated, every object in the running Node.js process inherits the attacker-controlled property. This breaks downstream security assumptions in authentication checks, template rendering, and option parsing.

Root Cause

The root cause is incomplete sanitization of property paths during recursive object assignment. The fix in commit 042af9c extends the forbidden-key check to cover access patterns that previously slipped through, including those routed via String.prototype.

Attack Vector

Exploitation requires the application to pass attacker-controlled data into a vulnerable Locutus helper that performs property assignment. The CVSS 4.0 vector indicates local attack surface with no privileges or user interaction required. In practice, exposure depends on how the host application forwards untrusted input — for example, parsing JSON request bodies and feeding them into Locutus utilities. No public proof-of-concept exploit is currently listed in Exploit-DB.

No verified exploit code is available. Refer to the GitHub Security Advisory GHSA-rxrv-835q-v5mh for technical details on the bypass.

Detection Methods for CVE-2026-25521

Indicators of Compromise

  • Unexpected properties appearing on Object.prototype at runtime, such as inherited isAdmin, polluted, or arbitrary attacker-chosen keys.
  • Application errors referencing properties on objects that were never explicitly set.
  • HTTP request bodies containing nested keys referencing __proto__, constructor.prototype, or string-indexed prototype access patterns.

Detection Strategies

  • Inventory Node.js projects with software composition analysis tools to flag locutus versions between 2.0.12 and 2.0.39.
  • Audit application logs for deserialization of user input that is subsequently passed to Locutus helpers performing property assignment.
  • Add runtime instrumentation that asserts Object.prototype remains free of unexpected enumerable properties during request handling.

Monitoring Recommendations

  • Forward Node.js process telemetry and application logs into a centralized analytics platform to correlate prototype-pollution indicators across services.
  • Alert on inbound JSON payloads containing the strings __proto__, constructor, or prototype in object keys.
  • Track package manifest changes in CI/CD pipelines to detect reintroduction of vulnerable Locutus versions.

How to Mitigate CVE-2026-25521

Immediate Actions Required

  • Upgrade locutus to version 2.0.39 or later across all Node.js services and build artifacts.
  • Audit transitive dependencies with npm ls locutus or yarn why locutus to identify indirect usage.
  • Validate and sanitize untrusted input before passing it to any Locutus helper that performs property assignment.

Patch Information

The maintainers released the fix in version 2.0.39 via commit 042af9ca7fde2ff599120783e720a17f335bb01c. Full advisory details are available in the GitHub Security Advisory GHSA-rxrv-835q-v5mh.

Workarounds

  • Freeze Object.prototype at application startup using Object.freeze(Object.prototype) to block runtime mutation.
  • Reject HTTP request payloads containing reserved keys such as __proto__, constructor, and prototype at the API gateway or middleware layer.
  • Replace vulnerable Locutus helpers with equivalent native JavaScript implementations until the upgrade is deployed.
bash
# Upgrade Locutus to the patched release
npm install locutus@2.0.39

# Verify the installed version
npm ls locutus

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

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.