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

Source: https://junglewise.ai/threats/cve-2026-25521-locutus-prototype-pollution-in-parse-str-function  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-04. Updated: 2026-06-27  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/locutus). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/locutusjs/locutus/commit/042af9ca7fde2ff599120783e720a17f335bb01c](https://github.com/locutusjs/locutus/commit/042af9ca7fde2ff599120783e720a17f335bb01c)
- [https://github.com/locutusjs/locutus/security/advisories/GHSA-rxrv-835q-v5mh](https://github.com/locutusjs/locutus/security/advisories/GHSA-rxrv-835q-v5mh)
- [https://access.redhat.com/security/cve/CVE-2026-25521](https://access.redhat.com/security/cve/CVE-2026-25521)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2436950](https://bugzilla.redhat.com/show_bug.cgi?id=2436950)
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25521.json](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25521.json)

## Related threats

- [Locutus prototype pollution in parse_str](https://junglewise.ai/threats/cve-2026-33994-locutus-prototype-pollution-in-parse-str)
- [Locutus prototype pollution via __proto__ injection in unserialize](https://junglewise.ai/threats/cve-2026-33993-locutus-prototype-pollution-via-proto-injection-in-unserialize)
- [Locutus code injection in create_function](https://junglewise.ai/threats/cve-2026-32304-locutus-code-injection-in-create-function)
- [Locutus remote code execution in call_user_func_array](https://junglewise.ai/threats/cve-2026-29091-locutus-remote-code-execution-in-call-user-func-array)
- [Locutus escapeshellarg command injection](https://junglewise.ai/threats/cve-2020-13619-locutus-escapeshellarg-command-injection)
