CVE-2026-32304: CWE-94: Improper Control of Generation of Code ('Code Injection') in locutusjs locutus
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.
AI Analysis
Technical Summary
The vulnerability in locutusjs locutus affects the create_function(args, code) function in versions before 3.0.14. This function directly passes its arguments to the JavaScript Function constructor without any sanitization, leading to improper control of code generation (CWE-94). This allows an attacker to execute arbitrary code. This vulnerability is distinct from a previous CVE (CVE-2026-29091) affecting version 2.x. The issue is resolved in version 3.0.14.
Potential Impact
Exploitation of this vulnerability allows an attacker to execute arbitrary code remotely without any privileges or user interaction, resulting in full confidentiality, integrity, and availability compromise of the affected system. The CVSS v3.1 score is 9.8 (critical), reflecting the high severity of this issue.
Mitigation Recommendations
An official fix is available in locutus version 3.0.14. Users should upgrade to version 3.0.14 or later to remediate this vulnerability. No additional mitigation steps are indicated by the vendor advisory.
CVE-2026-32304: CWE-94: Improper Control of Generation of Code ('Code Injection') in locutusjs locutus
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.
CVSS v3.1
Score 9.8critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in locutusjs locutus affects the create_function(args, code) function in versions before 3.0.14. This function directly passes its arguments to the JavaScript Function constructor without any sanitization, leading to improper control of code generation (CWE-94). This allows an attacker to execute arbitrary code. This vulnerability is distinct from a previous CVE (CVE-2026-29091) affecting version 2.x. The issue is resolved in version 3.0.14.
Potential Impact
Exploitation of this vulnerability allows an attacker to execute arbitrary code remotely without any privileges or user interaction, resulting in full confidentiality, integrity, and availability compromise of the affected system. The CVSS v3.1 score is 9.8 (critical), reflecting the high severity of this issue.
Mitigation Recommendations
An official fix is available in locutus version 3.0.14. Users should upgrade to version 3.0.14 or later to remediate this vulnerability. No additional mitigation steps are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-11T21:16:21.659Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-32304","vendor":"Red Hat"}]
Threat ID: 69b333cf2f860ef943fdd74d
Added to database: 03/12/2026, 21:44:47 UTC
Last enriched: 07/15/2026, 08:55:37 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 216
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.