Vulnerability DatabaseGHSA-p6x5-p4xf-cc4r

GHSA-p6x5-p4xf-cc4r
JavaScript vulnerability analysis and mitigation

Impact

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.

Patches

The vulnerability is addressed by using JSON.stringify() on string literal values in lib/node/ConstantNode.js to ensure they are treated as data rather than code. Users should upgrade to version 0.4.3 or later.

Workarounds

Avoid passing un-sanitized user input to the parser or manually escape string literals in the input.


SourceNVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-p6x5-p4xf-cc4rCRITICAL9.8
  • JavaScriptJavaScript
  • math-codegen
NoYesApr 17, 2026
CVE-2026-41242CRITICAL9.4
  • JavaScriptJavaScript
  • protobufjs
NoYesApr 18, 2026
GHSA-v38x-c887-992fCRITICAL9.2
  • JavaScriptJavaScript
  • flowise
NoYesApr 18, 2026
CVE-2026-40931HIGH8.4
  • JavaScriptJavaScript
  • compressing
NoYesApr 17, 2026
CVE-2026-40346MEDIUM6.4
  • JavaScriptJavaScript
  • @nocobase/plugin-workflow-request
NoYesApr 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management