Skip to content
Heist/ feed
Back to feed
Critical

Locutus: RCE via unsanitized input in create_function()

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-32304
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 02:15 UTC · Revision 1

Source evidence

Locutus: RCE via unsanitized input in create_function()

core-osv · Original source

Published 12 Mar 2026, 21:24 UTC

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.

osv:CVE-2026-32304
Complete source record
{
  "id": "cf0b44a29b3970208f4b513de1b6f69ef586643a75150f4eaa18b4773366a7c6",
  "url": "https://osv.dev/vulnerability/CVE-2026-32304",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Locutus: RCE via unsanitized input in create_function()",
    "summary": "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.",
    "evidence": "osv:CVE-2026-32304",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-32304",
      "aliases": [
        "CVE-2026-32304",
        "GHSA-vh9h-29pq-r5m8"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/locutusjs/locutus",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "cd9304d5e02fb43c438a43ace4349226c6ddb0de"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.0.14"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "cd9304d5e02fb43c438a43ace4349226c6ddb0de"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v3.0.14"
                  },
                  {
                    "cpe": "cpe:2.3:a:locutus:locutus:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.0.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.0.13",
            "v3.0.12",
            "v3.0.11",
            "v3.0.10",
            "v3.0.9",
            "v3.0.8",
            "v3.0.7",
            "v3.0.6",
            "v3.0.5",
            "v3.0.4",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.0.39",
            "v2.0.38",
            "v2.0.37",
            "v2.0.36",
            "v2.0.35",
            "v2.0.34",
            "v2.0.33",
            "v2.0.32",
            "v2.0.30",
            "v2.0.29",
            "v2.0.28",
            "v2.0.27",
            "v2.0.26",
            "v2.0.25",
            "v2.0.24",
            "v2.0.23",
            "v2.0.22",
            "v2.0.21",
            "v2.0.20",
            "v2.0.19",
            "v2.0.17",
            "v2.0.16",
            "v2.0.15",
            "v2.0.14",
            "v2.0.13",
            "v2.0.12",
            "v2.0.11",
            "v2.0.10",
            "v2.0.9",
            "v2.0.8",
            "v2.0.7",
            "v2.0.6",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.3.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32304.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.240026347Z",
      "provider": "osv",
      "references": [
        "https://github.com/locutusjs/locutus/releases/tag/v3.0.14",
        "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32304.json",
        "https://access.redhat.com/security/cve/CVE-2026-32304",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32304.json",
        "https://github.com/locutusjs/locutus/security/advisories/GHSA-vh9h-29pq-r5m8",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-32304",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2447200"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-94"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32304.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-32304",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514197,
  "published_at": "2026-03-12T21:24:51.73+00:00"
}