{
  "id": "CVE-2026-41507",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-41507",
  "published_at": "2026-05-08T13:49:34.091Z",
  "title": "Remote Code Execution (RCE) via String Literal Injection into math-codegen",
  "vendor": "mauriciopoppe",
  "product": "math-codegen",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "math-codegen generates code from mathematical expressions. Prior to version 0.4.3, string literal content passed to cg.parse() is injected verbatim into a new Function() body without sanitization. This allows an attacker to execute arbitrary system commands when user-controlled input reaches the parser. Any application exposing a math evaluation endpoint where user input flows into cg.parse() is vulnerable to full RCE. This issue has been patched in version 0.4.3.",
  "cwe": "CWE-94",
  "cpes": [
    "cpe:2.3:a:mauriciopoppe:math-codegen:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "mauriciopoppe",
        "product": "math-codegen",
        "ranges": [
          "\u003c 0.4.3"
        ],
        "fixed_in": [
          "0.4.3"
        ]
      }
    ],
    "upgrade": [
      "Upgrade math-codegen to 0.4.3 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/mauriciopoppe/math-codegen/security/advisories/GHSA-p6x5-p4xf-cc4r"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/mauriciopoppe/math-codegen/pull/11"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/mauriciopoppe/math-codegen/commit/4bb52d3030683362b3559ee8dd91350555a05f6b"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
