Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-33993: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in locutusjs locutus

0
Medium
VulnerabilityCVE-2026-33993cvecve-2026-33993cwe-1321
Published: Fri Mar 27 2026 (03/27/2026, 22:14:03 UTC)
Source: CVE Database V5
Vendor/Project: locutusjs
Product: locutus

Description

Locutus brings stdlibs of other programming languages to JavaScript for educational purposes. Prior to version 3.0.25, the `unserialize()` function in `locutus/php/var/unserialize` assigns deserialized keys to plain objects via bracket notation without filtering the `__proto__` key. When a PHP serialized payload contains `__proto__` as an array or object key, JavaScript's `__proto__` setter is invoked, replacing the deserialized object's prototype with attacker-controlled content. This enables property injection, for...in propagation of injected properties, and denial of service via built-in method override. This is distinct from the previously reported prototype pollution in `parse_str` (GHSA-f98m-q3hr-p5wq, GHSA-rxrv-835q-v5mh) — `unserialize` is a different function with no mitigation applied. Version 3.0.25 patches the issue.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/27/2026, 22:37:14 UTC

Technical Analysis

Locutus is a JavaScript library that ports standard libraries from other programming languages for educational use. The vulnerability CVE-2026-33993 affects the unserialize() function in the PHP var module of locutus versions prior to 3.0.25. This function deserializes PHP serialized data into JavaScript objects by assigning keys directly to plain objects using bracket notation. However, it fails to filter out the special __proto__ key, which in JavaScript is a setter that modifies an object's prototype. When an attacker crafts a PHP serialized payload containing __proto__ as a key with an array or object value, the unserialize() function triggers the __proto__ setter, replacing the prototype of the resulting object with attacker-controlled content. This prototype pollution allows attackers to inject arbitrary properties into all objects inheriting from the polluted prototype. Consequences include property injection that can affect application logic, propagation of malicious properties during iteration (for...in loops), and denial of service by overriding or disabling built-in methods. Unlike a previously reported prototype pollution in locutus's parse_str function, this vulnerability is in a different function and had no prior mitigations. The vulnerability is remotely exploitable without authentication or user interaction, increasing its risk. The issue was addressed in locutus version 3.0.25 by filtering or blocking the __proto__ key during deserialization. No public exploits have been reported yet, but the medium CVSS score of 6.9 reflects the potential impact and ease of exploitation.

Potential Impact

This vulnerability can have significant impacts on organizations using locutusjs versions prior to 3.0.25 in their JavaScript environments, especially if they deserialize untrusted PHP serialized data. Prototype pollution can lead to arbitrary property injection affecting application behavior, potentially causing logic errors, security bypasses, or data corruption. The ability to override built-in methods can result in denial of service conditions, destabilizing applications or services. Since the vulnerability does not require authentication or user interaction, it can be exploited remotely by attackers supplying malicious serialized payloads. This increases the attack surface, particularly for web applications or services that accept serialized data inputs. While no known exploits are currently reported, the widespread use of locutusjs in educational or development contexts means that vulnerable versions could be present in various environments. Organizations relying on locutusjs for PHP serialization emulation or similar functionality should consider the risk of prototype pollution leading to compromised application integrity and availability.

Mitigation Recommendations

Organizations should immediately upgrade locutusjs to version 3.0.25 or later, where the vulnerability is patched by filtering the __proto__ key during deserialization. If upgrading is not immediately feasible, implement input validation to reject or sanitize serialized data containing the __proto__ key or other suspicious keys before deserialization. Employ runtime protections such as freezing or sealing prototypes of critical objects to prevent prototype modification. Use security-focused static analysis or code review tools to detect unsafe deserialization patterns involving bracket notation assignments. Limit exposure by restricting access to interfaces that accept serialized data, applying network-level filtering or authentication controls. Monitor application logs for unusual property injection patterns or errors related to prototype pollution. Educate developers about the risks of prototype pollution and safe deserialization practices. Finally, maintain an inventory of locutusjs usage across projects to ensure all instances are identified and remediated.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-24T22:20:06.212Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69c702cd2b68dbd88e2edf8e

Added to database: 3/27/2026, 10:21:01 PM

Last enriched: 3/27/2026, 10:37:14 PM

Last updated: 3/27/2026, 11:43:48 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses