CVE-2026-29091

Locutus: Remote Code Execution (RCE) in locutus call_user_func_array due to Code Injection

Published Mar 6, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The bug lies in the implementation of call_user_func_array (and its alias call_user_func), which naively forwards parts of a callback array to eval() after failing to validate them fully. This omission permits an attacker to provide crafted JavaScript code that is executed with the privileges of the running application, leading to remote code execution. The weakness is categorized as CWE-94 (Code Injection) and CWE-95 (Eval Injection).

Affected Systems

The issue affects the open‑source library locutus, which exposes standard libraries of other languages to JavaScript. Versions older than 3.0.0 contain the vulnerable implementation. The library is typically used in Node.js environments, but can also be embedded in browser contexts. Any deployment of locutus prior to 3.0.0, regardless of installed Node.js version, is at risk.

Risk and Exploitability

CVSS core score of 8.1 indicates a high‑severity vulnerability. The EPSS score of less than 1% suggests that exploitation is currently unlikely to be widespread, and the flaw is not listed in the CISA KEV catalog. Nonetheless, because the bug allows arbitrary code execution, defenders should treat it as a high risk threat vector. An attacker could exploit the flaw remotely by injecting malicious payloads into a callback array that the application passes to call_user_func_array, which is then evaluated.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the locutus library to version 3.0.0 or later, which removes the vulnerable call_user_func_array implementation.
  • Audit any dependent code to ensure that no unvalidated or untrusted data is passed to eval-like functions provided by locutus or other libraries.
  • Replace the vulnerable functions with safe alternatives that perform strict validation, ensuring callback components are only function references from your codebase.
  • Monitor application logs for unexpected eval activity and apply runtime monitoring to detect unauthorized code execution attempts.

Generated by OpenCVE AI on April 16, 2026 at 11:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-fp25-p6mj-qqg6 locutus call_user_func_array vulnerable to Remote Code Execution (RCE) due to Code Injection
History
Type Values Removed Values Added
CPEs cpe:2.3:a:locutus:locutus:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
First Time appeared Locutus
Locutus locutus
Vendors & Products Locutus
Locutus locutus
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Locutus: Remote Code Execution (RCE) in locutus call_user_func_array due to Code Injection
Weaknesses CWE-95
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 1:10 AM
Reserved
Mar 3, 2026, 9:54 PM
Status
Modified
Published
Mar 6, 2026, 6:16 PM
Modified
Jul 15, 2026, 2:19 AM
Severity
Important
Public date
Mar 6, 2026, 5:48 PM