Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-55jh-84jv-8mx8
No affected components available
Impact
The APIVersion rule uses new Function() to evaluate expression strings. A malicious crafted flow metadata file can cause arbitrary JavaScript execution during scanning. An attacker could execute arbitrary JavaScript during a scan by supplying a malicious expression within rule configuration or crafted flow metadata. This could compromise developer machines, CI runners, or editor environments.
Patches
The patch removes all uses of new Function() and replaces them with a safer parser. It now validates operators (>, >=, <, <=, ==`) and performs numeric comparisons without evaluating untrusted JavaScript.
version: core-v6.10.6, version vsx:: v2.4.4 version app:: v3.1.0
Work around
// --- Handle APIVersion rule separately to avoid unsafe-eval in the core library ---
const apiVersionConfig = ruleConfig.rules.APIVersion;
if (apiVersionConfig) {
delete ruleConfig.rules.APIVersion;
}
// Manually evaluate the APIVersion rule, if it was configured.
if (apiVersionConfig) {
const flowApiVer = this.currentFlow.apiVersion || this.currentFlow.xmlData?.apiVersion;
const apiVersionRuleDef = allRules.find(r => r.name === "APIVersion");
// Determine the required expression (e.g. ">=58").
let requiredExpr;
if (apiVersionConfig.expression) {
requiredExpr = apiVersionConfig.expression;
} else if (apiVersionConfig.threshold != null) {
requiredExpr = `>=${apiVersionConfig.threshold}`;
}
if (requiredExpr) {
const minVer = parseInt(requiredExpr.replace(/[^0-9]/g, ""), 10);
const operator = requiredExpr.replace(/[0-9]/g, "").trim();
const operators = {
">=": (a, b) => a < b,
"<": (a, b) => a >= b,
">": (a, b) => a <= b,
"<=": (a, b) => a > b,
"==": (a, b) => a !== b,
"=": (a, b) => a !== b
};
const violation = operators[operator] ? operators[operator](flowApiVer, minVer) : flowApiVer < minVer;
if (violation) {
// Craft a result object that mimics the core scanner output so downstream logic remains unchanged.
const manualScanResult = [{
flow: parsedFlow,
ruleResults: [{
ruleName: "APIVersion",
ruleDefinition: {
description: apiVersionRuleDef?.description || "API Version check",
label: apiVersionRuleDef?.label || "APIVersion"
},
occurs: true,
severity: apiVersionConfig.severity,
details: [{
name: String(flowApiVer),
type: "apiVersion",
expression: requiredExpr
}]
}]
}];
results.push(...this.processScanResults(manualScanResult));
}
}
}
The vulnerability requires local access to the device to be exploited. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a high impact on the availability of the system.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard