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

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

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.

Technologies: locutus (npm). Vendors: npm.

Quick answers

Is CVE-2026-25521 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-25521 being exploited in the wild.
How severe is CVE-2026-25521?
Critical severity, with a CVSS score of 8.8, published 4 February 2026.
Which products and versions are affected?
locutus (npm) >= 2.0.12, < 2.0.39, SEMVER:introduced=2.0.12,fixed=2.0.39.
Is there a fix for CVE-2026-25521?
Yes. locutus (npm): upgrade to 2.0.39 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-25521 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-25521?
Check whether you run locutus (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • locutus (npm): upgrade to 2.0.39 or later
    npm install locutus@2.0.39

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

Identifiers

  • CVE-2026-25521
  • GHSA-rxrv-835q-v5mh

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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.