Vulnerability · Published Mar 12, 2026 · Assigned by GitHub_M
CVE-2026-32304Locutus: RCE via unsanitized input in create_function()
Critical 9.8
In plain English
A critical-severity code injection in locutus from locutusjs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Locutus brings stdlibs of other programming languages to JavaScript for educational purposes. Prior to 3.0.14, the create_function(args, code) function passes both parameters directly to the Function constructor without any sanitization, allowing arbitrary code execution. This is distinct from CVE-2026-29091 which was call_user_func_array using eval() in v2.x. This finding affects create_function using new Function() in v3.x. This vulnerability is fixed in 3.0.14.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | locutus | 3.0.14 | GHSA-vh9h-29pq-r5m8 |
Affected products (as reported)
Weakness: CWE-94, CWE-88 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/locutusjs/locutus/security/advisories/GHSA-vh9h-29pq-r5m8 x_refsource_CONFIRM
- https://github.com/locutusjs/locutus/releases/tag/v3.0.14 x_refsource_MISC
- https://access.redhat.com/security/cve/CVE-2026-32304 vdb-entry, x_refsource_REDHAT
- RHBZ#2447200 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32304.json x_sadp-csaf-vex