← Lab /Security & privacy

Common JavaScript obfuscations cause SAST tools to miss nearly all vulnerabilities

State-of-practice JavaScript SAST tools fail to detect most injected vulnerabilities after applying semantics-preserving obfuscations, with detection loss approaching 100%

Security & privacy arXiv 1 Apr 2026 Measurement Real-world evidence

Published as “Obfuscating Code Vulnerabilities against Static Analysis in JavaScript Code”

Why it matters

CI/CD pipelines cannot rely on clean SAST reports for obfuscated JavaScript code without additional deobfuscation or complementary testing.

Summary

Current JavaScript SAST tools can be almost completely evaded by applying even a single semantics-preserving obfuscation, with the Vulnerability Detection Loss (VDL) metric often reaching 100% and stacking multiple techniques only marginally increasing loss. The authors measured this effect on 16 vulnerable-by-design OWASP apps and 260 real-world GitHub projects, using two representative SAST tools (Njsscan and Bearer). Evidence is strong: both datasets show median VDL near 100% for most techniques and severity levels, and the study includes detailed per-project and per-technique analyses.

What they found 2

  1. Njsscan loses all high-severity detections after any single obfuscation.

    “For vulnerabilities classified as ’Error’, every single obfuscation technique achieves a median VDL of 100%.”

  2. Bearer retains detection for some projects and medium-severity issues.

    “It maintains near-perfect detection (median VDL ≈0%) on VulnerableApp-facade, websheep, and juice-shop”

Caveats 4

  • Bearer’s performance is more nuanced and reveals a strong dependency on vulnerability severity. For ’Medium’ severity category ... medians fall well below 100% ... CFF and DCI show median VDLs of approximately 75% and 30%, respectively.
  • First, the tooling scope threatens external validity: we focus on open-source SAST and a representative open-source obfuscator; proprietary engines or obfuscators may behave differently.
  • our stacking analysis studies the number of plugins rather than all permutations, so order effects may exist.
  • operational issues (e.g. empty or failed reports) occurred on a nonnegligible subset of repositories; we report these qualitatively and avoid drawing quantitative conclusions from failed runs.

What’s new here 4

  • First large-scale empirical evaluation of JavaScript obfuscation impact on SAST tools.
  • Introduces the Vulnerability Detection Loss (VDL) metric to quantify detection degradation.
  • Evaluates both single and stacked obfuscation techniques across benchmark and in-the-wild datasets.
  • Provides open-source datasets and scripts for reproducibility.