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.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)0.6%top 51.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npmlocutus3.0.14GHSA-vh9h-29pq-r5m8

Affected products (as reported)

VendorProductVersions
locutusjs locutus < 3.0.14

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