Locutus
CVE-2026-25521
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted parse_str input
-
DeliveryBypass forbidden-key guard via String.prototype or constructor key
-
ExploitWrite property onto Object.prototype
-
ExecutionPolluted property read by downstream code
-
ImpactAuth bypass, DoS, or RCE via sink
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A03:2021 - Injection
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to call locutus.php.strings.parse_str on attacker-influenced input. Two concrete paths exist: (1) the primary published PoC first overrides String.prototype.includes to return false, defeating the substring guard, then pollutes via __proto__[polluted]=yes - this presupposes the attacker can already mutate the JS runtime prototype; and (2) the advisory and tests also show pollution through crafted keys such as constructor[prototype][polluted]=yes. Limiting factors: the published CVSS marks the attack vector as Local (AV:L), no authentication or user interaction is required per the vector (PR:N/UI:N), and real impact is gated by whether the consuming application exposes parse_str to untrusted data and whether a usable pollution gadget exists downstream. Not in CISA KEV; EPSS is 0.01%. |
| Impact | Signals are mixed. The published CVSS 4.0 vector (AV:L/AC:L/PR:N/UI:N with VC/VI/VA:H and subsequent-system C/I/A:H) yields 9.4 (Critical), but EPSS is only 0.01% (1st percentile) and the issue is not on CISA KEV, so there is no evidence of real-world exploitation - this is high-CVSS-but-low-observed-risk, with publicly available PoC code being the main concrete signal. The CVSS local attack vector (AV:L) is notable and arguably conservative: parse_str typically processes string/query input that in many deployments is supplied remotely, so the realistic attack surface depends entirely on how a downstream application feeds untrusted data into parse_str - verify against your own integration. Equally important, the headline PoC requires the attacker to first override String.prototype.includes, which itself implies prior control over the JavaScript runtime; however the advisory's second pattern (constructor[prototype][polluted]=yes) and the bundled tests show pollution is reachable through key crafting alone in some paths, so the prerequisite should not be assumed to fully neutralize the bug. Net: patch as routine hygiene if you ship Locutus and pass untrusted input to parse_str, but this is not an emergency relative to actively exploited vulnerabilities. |
| Exploit ScenarioDerived | A web service uses locutus.php.strings.parse_str to parse user-supplied query-string-style input into an object. An attacker submits a crafted payload such as constructor[prototype][polluted]=yes (or, where they can tamper with String.prototype.includes, a __proto__ key) which writes onto Object.prototype; downstream code that later reads the polluted property may suffer denial of service, authentication-logic bypass, or, if the value reaches a dangerous sink, remote code execution. Working PoC code is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jun 27, 2026
Prototype pollution in the Locutus JavaScript library (npm package, versions >= 2.0.12 and < 2.0.39) lets attacker-influenced input passed to the php.strings.parse_str function pollute Object.prototype, bypassing a prior guard. The earlier fix rejected forbidden keys using String.prototype.includes(), but an attacker able to override that method - or supply crafted keys such as constructor[prototype][polluted]=yes - defeats the check; publicly available exploit code exists in the GHSA advisory. EPSS exploitation probability is very low (0.01%, 1st percentile), it is not on CISA KEV, and no public exploit is identified as active in the wild.
Earlier versions of this analysis (2)
Prototype pollution in the npm package Locutus (versions >= 2.0.12 and < 2.0.39) lets attacker-controlled input passed to the PHP-shim function locutus.php.strings.parse_str inject properties onto Object.prototype. A prior fix that blacklisted keys containing '__proto__', 'constructor', or 'prototype' relied on String.prototype.includes(), which can be defeated, allowing a crafted key such as 'constructor[prototype][polluted]=yes' to bypass the guard. Publicly available exploit code exists in the GitHub Security Advisory; this is not in CISA KEV and EPSS is very low (0.01%, 1st percentile).
Locutus versions up to 2.0.39 is affected by improperly controlled modification of object prototype attributes (prototype pollution) (CVSS 8.8).
RemediationAI
Upgrade to Locutus 2.0.39 or later, which replaces the String.prototype.includes-based key guard with a regex test that cannot be bypassed by tampering with string-prototype methods (Vendor-released patch: 2.0.39; commit 042af9ca7fde2ff599120783e720a17f335bb01c). Until you can upgrade, avoid passing attacker-controlled input directly into locutus.php.strings.parse_str, and validate or reject keys containing __proto__, constructor, or prototype before parsing; as a structural defense, call Object.freeze(Object.prototype) at process start (trade-off: this breaks libraries that legitimately extend built-in prototypes) or parse into a null-prototype target object where feasible. Review the GHSA advisory (https://github.com/locutusjs/locutus/security/advisories/GHSA-rxrv-835q-v5mh) and the commit diff for exact behavior, and audit downstream sinks such as eval or child_process where a polluted property could be leveraged.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Locutus reimplements standard libraries from other languages (notably PHP) in JavaScript for educational use. The flaw is CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes, i.e. prototype pollution) in src/php/strings/parse_str.js, the PHP parse_str() port that parses query-string-style input into a target object. The prior mitigation checked each parsed key with key.includes('__proto__'|'constructor'|'prototype'); because that guard depends on the runtime's mutable String.prototype.includes method, an attacker who can replace it with a function returning false (or otherwise evade the substring check) causes nested assignments like constructor[prototype][polluted] to write onto Object.prototype, affecting every object in the process. The CPE cpe:2.3:a:locutus:locutus:*:*:*:*:*:node.js:*:* confirms the affected target is the Node.js distribution of the package. The patch replaces the includes()-based check with a regex test (/__proto__|constructor|prototype/.test(key)), which does not depend on mutable string-prototype methods.
Know when Locutus gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Input is typically remote data (AV:N) but reliable exploitation depends on a tampered prototype or downstream gadget (AC:H); pollution mainly corrupts integrity (I:H) with lesser confidentiality/availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
7DescriptionCVE.org
Locutus brings stdlibs of other programming languages to JavaScript for educational purposes. In versions from 2.0.12 to before 2.0.39, a prototype pollution vulnerability exists in locutus. Despite a previous fix that attempted to mitigate prototype pollution by checking whether user input contained a forbidden key, it is still possible to pollute Object.prototype via a crafted input using String.prototype. This issue has been patched in version 2.0.39.
Executive ViewAI
Locutus JavaScript library versions 2.0.12 through 2.0.38 contain a prototype pollution vulnerability (CVSS 9.4) enabling object manipulation attacks. While publicly available exploit code exists, real-world exploitation probability is extremely low (0.01% EPSS) and no active attacks have been confirmed. Organizations using this npm package should update to version 2.0.39 or later to eliminate the attack surface.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
Versions of package locutus before 2.0.12 are vulnerable to prototype Pollution via the php.strings.parse_str function.
The package locutus before 2.0.15 are vulnerable to Regular Expression Denial of Service (ReDoS) via the gopher_parsedir
php/exec/escapeshellarg in Locutus PHP through 2.0.11 allows an attacker to achieve code execution. Rated critical sever
Remote code execution in Locutus prior to version 3.0.0 allows unauthenticated remote attackers to execute arbitrary Jav
GHSA-rxrv-835q-v5mh
NVD
CVE.org
EPSS
Exploit-DB