{"id":"CVE-2025-67750","aliases":["EUVD-2025-203110","GHSA-55jh-84jv-8mx8"],"status":"published","title":"Lightning Flow Scanner is Vulnerable to Code Injection via Unsafe Use of new Function() in APIVersion Rule","description":"Lightning Flow Scanner provides a A CLI plugin, VS Code Extension and GitHub Action for analysis and optimization of Salesforce Flows. Versions 6.10.5 and below allow a maliciously crafted flow metadata file to cause arbitrary JavaScript execution during scanning. The APIVersion rule uses new Function() to evaluate expression strings, enabling an attacker to supply a malicious expression within rule configuration or crafted flow metadata. This could compromise developer machines, CI runners, or editor environments. This issue is fixed in version 6.10.6.","severity":{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00207,"percentile":0.10915,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94"],"published":"2025-12-12T20:14:21Z","modified":"2026-10-28T02:30:34Z","fixes":[{"ecosystem":"npm","package":"lightning-flow-scanner","fixed_in":["6.10.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"lightning-flow-scanner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.10.6"}]}]},{"source":"osv","ecosystem":"npm","package":"lightning-flow-scanner","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"6.10.6"}]}]}],"products":[{"vendor":"flow-scanner","product":"lightning-flow-scanner"}],"references":[{"url":"https://github.com/Flow-Scanner/lightning-flow-scanner/security/advisories/GHSA-55jh-84jv-8mx8","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/Flow-Scanner/lightning-flow-scanner/commit/10f64a5eb193d8a777e453b25e910144e4540795","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/Flow-Scanner/lightning-flow-scanner/releases/tag/core-v6.10.6","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-67750","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-55jh-84jv-8mx8"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/67xxx/CVE-2025-67750.json","tags":["advisory"]},{"url":"https://github.com/Flow-Scanner/lightning-flow-scanner","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-67750","title":"Lightning Flow Scanner is Vulnerable to Code Injection via Unsafe Use of new Function() in APIVersion Rule","description":"Lightning Flow Scanner provides a A CLI plugin, VS Code Extension and GitHub Action for analysis and optimization of Salesforce Flows. Versions 6.10.5 and below allow a maliciously crafted flow metadata file to cause arbitrary JavaScript execution during scanning. The APIVersion rule uses new Function() to evaluate expression strings, enabling an attacker to supply a malicious expression within rule configuration or crafted flow metadata. This could compromise developer machines, CI runners, or editor environments. This issue is fixed in version 6.10.6.","status":"published","published":"2025-12-12T20:14:21.004Z","modified":"2025-12-12T20:50:57.161Z","cvss":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:32:52.21763Z"}],"euvd":[{"id":"EUVD-2025-203110","description":"Lightning Flow Scanner provides a A CLI plugin, VS Code Extension and GitHub Action for analysis and optimization of Salesforce Flows. Versions 6.10.5 and below allow a maliciously crafted flow metadata file to cause arbitrary JavaScript execution during scanning. The APIVersion rule uses new Function() to evaluate expression strings, enabling an attacker to supply a malicious expression within rule configuration or crafted flow metadata. This could compromise developer machines, CI runners, or editor environments. This issue is fixed in version 6.10.6.","status":"published","published":"2025-12-12T20:14:21Z","modified":"2025-12-12T20:50:57Z","cvss":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T19:49:05.447386Z"}],"ghsa":[{"id":"GHSA-55jh-84jv-8mx8","title":"Lightning Flow Scanner Vulnerable to Code Injection via Unsafe Use of `new Function()` in APIVersion Rule","description":"### Impact\nThe 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.\n\n### Patches\nThe patch removes all uses of `new Function()` and replaces them with a safer parser. It now validates operators (`\u003e`, \u003e=`, `\u003c`, `\u003c=`, `==`) and performs numeric comparisons without evaluating untrusted JavaScript.\n\n**version:** core-v6.10.6,\n**version vsx:**: v2.4.4\n**version app:**: v3.1.0\n\n### Work around\n\n```\n// --- Handle APIVersion rule separately to avoid unsafe-eval in the core library ---\n      const apiVersionConfig = ruleConfig.rules.APIVersion;\n      if (apiVersionConfig) {\n        delete ruleConfig.rules.APIVersion;\n      }\n\n// Manually evaluate the APIVersion rule, if it was configured.\n      if (apiVersionConfig) {\n        const flowApiVer = this.currentFlow.apiVersion || this.currentFlow.xmlData?.apiVersion;\n        const apiVersionRuleDef = allRules.find(r =\u003e r.name === \"APIVersion\");\n\n        // Determine the required expression (e.g. \"\u003e=58\").\n        let requiredExpr;\n        if (apiVersionConfig.expression) {\n          requiredExpr = apiVersionConfig.expression;\n        } else if (apiVersionConfig.threshold != null) {\n          requiredExpr = `\u003e=${apiVersionConfig.threshold}`;\n        }\n\n        if (requiredExpr) {\n          const minVer = parseInt(requiredExpr.replace(/[^0-9]/g, \"\"), 10);\n          const operator = requiredExpr.replace(/[0-9]/g, \"\").trim();\n          const operators = {\n            \"\u003e=\": (a, b) =\u003e a \u003c b,\n            \"\u003c\": (a, b) =\u003e a \u003e= b,\n            \"\u003e\": (a, b) =\u003e a \u003c= b,\n            \"\u003c=\": (a, b) =\u003e a \u003e b,\n            \"==\": (a, b) =\u003e a !== b,\n            \"=\": (a, b) =\u003e a !== b\n          };\n          const violation = operators[operator] ? operators[operator](flowApiVer, minVer) : flowApiVer \u003c minVer;\n\n          if (violation) {\n            // Craft a result object that mimics the core scanner output so downstream logic remains unchanged.\n            const manualScanResult = [{\n              flow: parsedFlow,\n              ruleResults: [{\n                ruleName: \"APIVersion\",\n                ruleDefinition: {\n                  description: apiVersionRuleDef?.description || \"API Version check\",\n                  label: apiVersionRuleDef?.label || \"APIVersion\"\n                },\n                occurs: true,\n                severity: apiVersionConfig.severity,\n                details: [{\n                  name: String(flowApiVer),\n                  type: \"apiVersion\",\n                  expression: requiredExpr\n                }]\n              }]\n            }];\n            results.push(...this.processScanResults(manualScanResult));\n          }\n        }\n      }\n\n```","status":"published","published":"2025-12-12T20:20:34Z","modified":"2026-02-10T23:08:21Z","cvss":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:39:24.742346Z"}],"nvd":[{"id":"CVE-2025-67750","description":"Lightning Flow Scanner provides a A CLI plugin, VS Code Extension and GitHub Action for analysis and optimization of Salesforce Flows. Versions 6.10.5 and below allow a maliciously crafted flow metadata file to cause arbitrary JavaScript execution during scanning. The APIVersion rule uses new Function() to evaluate expression strings, enabling an attacker to supply a malicious expression within rule configuration or crafted flow metadata. This could compromise developer machines, CI runners, or editor environments. This issue is fixed in version 6.10.6.","status":"published","published":"2025-12-12T21:15:59.857Z","modified":"2026-10-14T13:10:00.187Z","cvss":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:11:50.400521Z"}],"osv":[{"id":"CVE-2025-67750","title":"Lightning Flow Scanner is Vulnerable to Code Injection via Unsafe Use of new Function() in APIVersion Rule","description":"Lightning Flow Scanner provides a A CLI plugin, VS Code Extension and GitHub Action for analysis and optimization of Salesforce Flows. Versions 6.10.5 and below allow a maliciously crafted flow metadata file to cause arbitrary JavaScript execution during scanning. The APIVersion rule uses new Function() to evaluate expression strings, enabling an attacker to supply a malicious expression within rule configuration or crafted flow metadata. This could compromise developer machines, CI runners, or editor environments. This issue is fixed in version 6.10.6.","status":"published","published":"2025-12-12T20:14:21.004Z","modified":"2026-10-28T02:30:34.002145136Z","cvss":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:44:52.53036Z"},{"id":"GHSA-55jh-84jv-8mx8","title":"Lightning Flow Scanner Vulnerable to Code Injection via Unsafe Use of `new Function()` in APIVersion Rule","description":"### Impact\nThe 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.\n\n### Patches\nThe patch removes all uses of `new Function()` and replaces them with a safer parser. It now validates operators (`\u003e`, \u003e=`, `\u003c`, `\u003c=`, `==`) and performs numeric comparisons without evaluating untrusted JavaScript.\n\n**version:** core-v6.10.6,\n**version vsx:**: v2.4.4\n**version app:**: v3.1.0\n\n### Work around\n\n```\n// --- Handle APIVersion rule separately to avoid unsafe-eval in the core library ---\n      const apiVersionConfig = ruleConfig.rules.APIVersion;\n      if (apiVersionConfig) {\n        delete ruleConfig.rules.APIVersion;\n      }\n\n// Manually evaluate the APIVersion rule, if it was configured.\n      if (apiVersionConfig) {\n        const flowApiVer = this.currentFlow.apiVersion || this.currentFlow.xmlData?.apiVersion;\n        const apiVersionRuleDef = allRules.find(r =\u003e r.name === \"APIVersion\");\n\n        // Determine the required expression (e.g. \"\u003e=58\").\n        let requiredExpr;\n        if (apiVersionConfig.expression) {\n          requiredExpr = apiVersionConfig.expression;\n        } else if (apiVersionConfig.threshold != null) {\n          requiredExpr = `\u003e=${apiVersionConfig.threshold}`;\n        }\n\n        if (requiredExpr) {\n          const minVer = parseInt(requiredExpr.replace(/[^0-9]/g, \"\"), 10);\n          const operator = requiredExpr.replace(/[0-9]/g, \"\").trim();\n          const operators = {\n            \"\u003e=\": (a, b) =\u003e a \u003c b,\n            \"\u003c\": (a, b) =\u003e a \u003e= b,\n            \"\u003e\": (a, b) =\u003e a \u003c= b,\n            \"\u003c=\": (a, b) =\u003e a \u003e b,\n            \"==\": (a, b) =\u003e a !== b,\n            \"=\": (a, b) =\u003e a !== b\n          };\n          const violation = operators[operator] ? operators[operator](flowApiVer, minVer) : flowApiVer \u003c minVer;\n\n          if (violation) {\n            // Craft a result object that mimics the core scanner output so downstream logic remains unchanged.\n            const manualScanResult = [{\n              flow: parsedFlow,\n              ruleResults: [{\n                ruleName: \"APIVersion\",\n                ruleDefinition: {\n                  description: apiVersionRuleDef?.description || \"API Version check\",\n                  label: apiVersionRuleDef?.label || \"APIVersion\"\n                },\n                occurs: true,\n                severity: apiVersionConfig.severity,\n                details: [{\n                  name: String(flowApiVer),\n                  type: \"apiVersion\",\n                  expression: requiredExpr\n                }]\n              }]\n            }];\n            results.push(...this.processScanResults(manualScanResult));\n          }\n        }\n      }\n\n```","status":"published","published":"2025-12-12T20:20:34Z","modified":"2025-12-20T05:07:45.36603Z","cvss":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:37.864461Z"}]}}
