Security
New framework decouples taint tracking from runtime systems for better security analysis
Researchers introduce Mystra, a declarative language that lets developers specify how sensitive data flows through code without tight coupling to specific JavaScript or Python engines.
Dynamic taint analysis—a technique for tracking how sensitive data moves through a program—has long suffered from a fundamental architectural constraint: the logic for tracking data contamination gets baked directly into runtime systems, forcing engineers to choose between slow source-level rewrites or engine-specific implementations that don't generalize.
Researchers at arXiv have presented Mystra, a declarative specification language that separates taint semantics from the mechanics of how runtimes execute. The approach uses a shadow virtual machine running in parallel with JavaScript, Python, or other interpreted languages to maintain taint states independently of the host engine.
How the system works#
The shadow VM tracks three layers of information: which values carry taint marks, the provenance (origin) of that taint, and how taint flows across function calls. Mystra rules are written declaratively—describing what taint rules apply rather than how to implement them—and are compiled ahead of time to binary form. This design choice sidesteps the overhead that has historically plagued taint analysis tools.
The team demonstrates the approach through Shar, a tool they built with instantiations on three major runtimes: V8 (used in Node.js and Chromium), SpiderMonkey (Firefox's engine), and CPython.
Accuracy and performance#
When tested against SecBench.js, a suite of 493 real-world security vulnerabilities spanning four risk categories, the V8 version achieved 95.5% recall with zero false positives on patched versions of code. In terms of runtime cost, Shar adds 1.85× overhead on Node.js benchmarks, while delivering 22.7× better performance than existing tools like NodeMedic-FINE and 33.2% higher recall in supported categories.
Key innovation#
Mystra is notably the first system to express higher-order function taint transfer—where sensitive data moves through callback functions and closures—using pure declarative rules. The language is also designed to be "language model friendly," meaning it includes validators to support automated synthesis of taint rules by AI systems, potentially lowering the barrier to writing correct policies.

