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-29091: CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in locutusjs locutus

0
High
VulnerabilityCVE-2026-29091cvecve-2026-29091cwe-95
Published: Fri Mar 06 2026 (03/06/2026, 17:48:10 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.0, a remote code execution (RCE) flaw was discovered in the locutus project, specifically within the call_user_func_array function implementation. The vulnerability allows an attacker to inject arbitrary JavaScript code into the application's runtime environment. This issue stems from an insecure implementation of the call_user_func_array function (and its wrapper call_user_func), which fails to properly validate all components of a callback array before passing them to eval(). This issue has been patched in version 3.0.0.

AI-Powered Analysis

AILast updated: 03/06/2026, 18:15:38 UTC

Technical Analysis

CVE-2026-29091 is a remote code execution vulnerability identified in the locutus JavaScript library, specifically affecting versions prior to 3.0.0. Locutus is a library that ports standard libraries from other programming languages to JavaScript, primarily for educational purposes. The vulnerability exists in the implementation of the call_user_func_array function and its wrapper call_user_func. These functions accept a callback array, which is intended to specify a function and its context. However, the implementation fails to properly validate all components of this callback array before passing them to the JavaScript eval() function. This improper neutralization of directives in dynamically evaluated code (classified as CWE-95) enables an attacker to inject arbitrary JavaScript code into the runtime environment. Because eval() executes code with the privileges of the hosting environment, successful exploitation can lead to full remote code execution, compromising confidentiality, integrity, and availability of the affected system. The vulnerability does not require authentication or user interaction, increasing its risk profile. The issue was patched in locutus version 3.0.0 by correcting the validation logic to prevent unsafe code injection. No known exploits have been reported in the wild as of the publication date, but the high CVSS score of 8.1 reflects the critical nature of the flaw. This vulnerability is particularly relevant for developers and organizations using locutus in web applications or educational tools where untrusted input might reach these vulnerable functions.

Potential Impact

The impact of CVE-2026-29091 is significant due to its remote code execution nature without requiring authentication or user interaction. An attacker exploiting this flaw can execute arbitrary JavaScript code within the context of the vulnerable application, potentially leading to full system compromise. This can result in data theft, unauthorized access, manipulation or destruction of data, and disruption of service. For organizations, this could mean exposure of sensitive information, loss of intellectual property, and damage to reputation. Since locutus is used primarily in educational contexts and some development environments, the risk extends to any web applications or services that incorporate this library without patching. The vulnerability could also be leveraged as a pivot point for further attacks within a compromised network. Although no active exploits are currently known, the ease of exploitation and the critical impact on confidentiality, integrity, and availability make this a high-risk vulnerability that demands prompt remediation.

Mitigation Recommendations

Organizations should immediately upgrade all instances of the locutus library to version 3.0.0 or later, where the vulnerability has been patched. Additionally, developers should audit their codebases for any usage of call_user_func_array and call_user_func wrappers to ensure they do not pass untrusted input to eval() or similar dynamic code execution functions. Implement strict input validation and sanitization for any data that could influence callback arrays or dynamic code execution paths. Employ code reviews and static analysis tools to detect unsafe eval() usage patterns. Where possible, avoid using eval() altogether or replace it with safer alternatives. For environments where upgrading is not immediately feasible, consider applying runtime protections such as Content Security Policy (CSP) headers to restrict script execution or sandboxing vulnerable components. Monitoring and logging suspicious activity related to dynamic code execution can also help detect exploitation attempts early.

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-03T21:54:06.707Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69ab1661c48b3f10ffba181e

Added to database: 3/6/2026, 6:01:05 PM

Last enriched: 3/6/2026, 6:15:38 PM

Last updated: 3/7/2026, 8:13:00 AM

Views: 7

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 in Console -> Billing 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