Junglewise Threat Intelligence

CVE-2026-25521: Locutus prototype pollution in parse_str function

CVE-2026-25521 · Severity: high · CVSS 8.8 · Published 2026-02-04

Technologies: Locutusjs Locutus. Vendors: npm.

Executive brief

Locutus is a JavaScript library that provides implementations of standard libraries from other programming languages. A security flaw in its string parsing function allows an attacker to modify the fundamental behavior of the JavaScript environment. This could lead to unauthorized data access, service crashes, or the ability to run malicious code within applications that use this library.

Technical details

A prototype pollution vulnerability exists in the locutus npm package within the `php.strings.parse_str` function. The vulnerability stems from an insufficient mitigation that used `String.prototype.includes()` to filter forbidden keys like `__proto__`. An attacker can bypass this check by overriding the global `String.prototype.includes` method to always return false before the parsing function is called. By supplying crafted input such as `constructor[prototype][polluted]=yes`, an attacker can pollute the `Object.prototype`. This can be leveraged for various impacts including authentication bypass or remote code execution if the polluted properties reach sensitive sinks. The issue is fixed in version 2.0.39 by replacing the vulnerable check with a regex-based test.

Affected products

  • locutusjs locutus >= 2.0.12, < 2.0.39

Timeline

  • 2026-02-02: advisory: GitHub Security Advisory published by maintainers
  • 2026-02-04: disclosed: CVE-2026-25521 published to NVD
  • 2026-02-04: patched: Fix committed and version 2.0.39 released

References

Related threats