Executive brief
Locutus is a JavaScript library that provides PHP-compatible utility functions. A prototype pollution vulnerability in its parse_str function allows attackers to corrupt the base object prototype, potentially leading to authentication bypass, service disruption, or code execution in applications that process untrusted input with this library.
Technical details
The parse_str function in Locutus contains a prototype pollution vulnerability stemming from an incomplete fix for CVE-2026-25521. The previous patch replaced a String.prototype.includes()-based guard with RegExp.prototype.test(), but RegExp.prototype.test is itself a writable method that can be overridden. An attacker can bypass the guard by first polluting RegExp.prototype.test (via a separate prototype pollution gadget in another npm package) to always return false, then passing a crafted query string like '__proto__[polluted]=yes' to parse_str, allowing them to corrupt Object.prototype. The fix shipped in version 3.0.25 removes dependency on prototype methods and instead hardens the assignment sink itself using direct string comparisons that cannot be overridden.
Affected products
- Locutus Locutus 2.0.39 through 3.0.24
Timeline
- 2026-03-27: disclosed
- 2026-03-27: patched: Fixed in version 3.0.25
- 2026-03-27: advisory: GHSA-vc8f-x9pp-wf5p published