What is taint analysis?
How data is tracked from source to sink
Taint analysis is a program analysis technique that marks data from an untrusted source, follows that data as the program copies and combines it, and reports where it reaches a sensitive operation, called a sink. Static taint analysis reasons about the code without running it; dynamic taint analysis tracks the data during a real run, which is how it works on compiled binaries without source code.
Taint analysis is also called taint checking or taint tracking. Most explanations treat it as a source code security feature. This one also covers how it works on machine code, where it fails, and which open-source tools do it. On 13 November 2026, Devirt counted 23 open-source taint analysis tools through the GitHub API: 16 of them analyze binary code, and of the 7 built mainly for binary taint tracking, only one had been updated in the preceding 12 months.
The article belongs to Devirt's binary analysis research, which focuses on what protected executables hide from static and dynamic analysis.
What is taint analysis?
Taint analysis is a form of data-flow analysis that answers one question: can data from this source reach that operation, and through which steps? The analysis attaches a mark, called taint, to every value that comes from a source, carries the mark along as values are copied and computed, and checks whether a marked value arrives at a sink.
Perl's taint mode is an early example that is still documented. It is switched on with the -T flag, treats command-line arguments, environment variables and file input as tainted, and stops the script with an “Insecure dependency” error when tainted data reaches an operation such as running a shell command or opening a file for writing, as Perl's security documentation describes. In 2005, James Newsome and Dawn Song applied it to compiled software: their tool TaintCheck performed dynamic taint analysis on commodity binaries through run-time binary rewriting, with no source code or special compilation.
Security teams use taint analysis to find injection weaknesses such as SQL injection, which the CWE list catalogs as CWE-89. Reverse engineers use it to see which instructions touch the bytes of a file format or protocol message, and malware analysts use it to see where network input ends up. The last section of this article lists the main uses with examples.
Sources, sinks and sanitizers
Every taint analysis is configured with three kinds of location. A taint source is where untrusted data enters a program, such as a network socket, a file, a command-line argument or an HTTP parameter. A taint sink is an operation where tainted data could cause harm or must be watched, such as a SQL query, a shell command, the length argument of a memory copy or the target of an indirect jump. A sanitizer is a check or transformation, such as input validation or escaping, after which the analysis treats the data as safe for a given sink.

On binaries, sinks are usually machine-level operations. The 2010 survey by Edward Schwartz, Thanassis Avgerinos and David Brumley, All You Ever Wanted to Know About Dynamic Taint Analysis and Forward Symbolic Execution, uses a “tainted jump policy” as its running example: a value derived from input must never become the target of a jump, which is what a control-flow hijacking exploit needs. The same survey calls the full set of rules a taint policy, covering when taint is introduced, how it propagates and when it is checked.
How taint propagates through instructions
Taint propagation is the set of rules that decides which outputs of an instruction are tainted. libdft, a dynamic taint tracking library from Columbia University described in a 2012 VEE paper, groups x86 instructions into classes with one rule each.
| Instruction class | Example | Taint rule |
|---|---|---|
| Data transfer | mov eax, [buf] | The destination takes the source's taint |
| Arithmetic and logic | add eax, ebx | The destination takes the union of both operands' taint |
| Immediate value | mov ebx, 0x10 | Constants are never tainted, so the destination is cleared |
| Zeroing idiom | xor ecx, ecx | Cleared: the result is always zero, whatever the input |
| Flags and branches | cmp eax, 0x40 then jb | Not tracked by data-flow trackers such as libdft |
The last row is where implicit flows escape a data-flow tracker. The animation applies the other rules to nine instructions, from a read() call to a memcpy whose length comes from the input.
The tags live in shadow memory, a separate area that mirrors the program's memory and registers. libdft can keep one bit per byte of memory, which costs 12.5% of the address space on 32-bit x86, or one byte per byte, which allows eight different tags, called colors. PANDA's taint2 plugin goes further and keeps a set of labels per value: if a carries label 1 and b carries label 2, then c = a + b carries the set {1, 2}, as the taint2 documentation shows. Label sets let one run track which of several inputs a value came from.
Static vs dynamic taint analysis
Static and dynamic taint analysis answer the same question in different ways. Static taint analysis reads the code without running it and can cover paths that a test never reaches, but it has to approximate values such as pointers and indirect jump targets, which produces false positives. Dynamic taint analysis observes real values on one execution, so its findings are concrete, but it says nothing about the paths that execution did not take.
| Point of comparison | Static taint analysis | Dynamic taint analysis |
|---|---|---|
| When it runs | On the code, without executing it | During a real execution |
| Paths covered | Potentially all, including untested ones | Only the paths the run takes |
| Values | Approximated (pointers, indirect targets) | Concrete |
| Typical error | False positives from approximation | Missed flows on paths the run did not take |
| Typical input | Source code, bytecode or lifted binary code | A running binary, often under instrumentation |
| Examples in the count below | CodeQL, Semgrep, FlowDroid, BinCAT | libdft64, Taintgrind, PANDA, Triton |
Most vendor explanations of taint analysis describe the static kind, because that is what static application security testing tools sell. Binary analysis leans the other way: without source code, running the program and watching its data is often the most direct way to see where input goes.
What is dynamic taint analysis?
Dynamic taint analysis is taint analysis performed while a program runs: every byte that arrives from a taint source, such as a file read or a network receive, gets a tag in shadow memory, and each executed instruction copies or combines those tags according to a propagation rule. Schwartz, Avgerinos and Brumley describe it as running a program and observing “which computations are affected by predefined taint sources such as user input”.
A dynamic taint tracker on a binary works in three stages:
- Tag at the sources. The tracker intercepts the places where data enters, such as the
readsystem call, and tags the bytes it returns. libdft lets a tool place sources and sinks on instructions, function calls and system calls. - Propagate on every instruction. An instrumentation framework inserts a small piece of analysis code before each instruction that moves or combines data, which applies the rule for that instruction to the shadow memory.
- Check at the sinks. At each sink, the tracker reads the tags of the operands, for example the register holding an indirect call target, and reports or stops when they are tainted.
The instrumentation comes from a framework that rewrites the program as it runs. libdft and Dytan use Intel Pin, Taintgrind is a plugin for Valgrind, and dynTaintTracer and drtaint use DynamoRIO. Whole-system trackers emulate the entire machine instead: PANDA translates QEMU's intermediate code to LLVM and adds taint operations to it, and it can record an execution and replay it, which its documentation describes as enabling iterative, deep, whole-system analyses.
Dynamic taint analysis costs time. The 2012 libdft paper reported slowdowns between 1.14 and 6.03 times for command-line utilities, and between 1.25 and 4.83 times for the Apache and MySQL servers, on 32-bit x86 Linux. The same paper cites a 30 times slowdown that Dytan reported for compressing with gzip.
What are over-tainting and under-tainting?
Over-tainting is when taint analysis marks data as tainted even though it does not depend on the source, which produces false positives; under-tainting is when the analysis misses a real dependency, which produces false negatives. Schwartz, Avgerinos and Brumley name both errors and call an analysis precise only when neither occurs.
Three causes recur:
- Tainted addresses. A memory access involves an address and a value. If an input-derived index selects which cell to read, a policy that taints the result whenever the address is tainted can over-taint, and one that ignores the address can under-taint. Asia Slowinska and Herbert Bos tested this kind of pointer tainting in Pointless tainting? (EuroSys 2009) and found it flawed in most of its forms for detecting privacy-breaching malware such as keyloggers.
- Implicit flows. Data can influence a value through a branch instead of a copy:
if (x == 1) y = 1;makesydepend onxwithout moving any ofxintoy. Schwartz, Avgerinos and Brumley point out that pure dynamic taint analysis cannot compute these control dependencies, because doing so requires reasoning about more than one path. libdft does not track them. Dytan can, but, as the libdft paper reports, Dytan's authors concluded that doing so often leads to an explosion in the amount of tagged data. - Taint that never clears. An analysis that only adds taint spreads it to more and more values. Removing it correctly, the sanitization problem, needs rules for cases such as
xor eax, eax, whose result is always zero.
These limits shape how a taint result should be read. A clean result means no flow was seen under the chosen policy, on the paths that ran. It does not mean no flow exists.
Open-source taint analysis tools, measured
Devirt counted 23 open-source taint analysis tools on GitHub on 13 November 2026: 16 analyze binary code, 2 analyze Java or Android bytecode and 5 analyze source code or compiler intermediate representation (IR). Of the 16 binary tools, 13 obtain taint by running the program under instrumentation or emulation, and 3 work statically. Of the 7 repositories built mainly for binary taint tracking, only Taintgrind received a push in the preceding 12 months, and 6 of the 7 have no release or tag on GitHub.
Method. The sample covers public, non-fork GitHub repositories whose README, or a named file in the repository, documents taint analysis or taint tracking. A script queried the GitHub REST API for each repository's language, licence, stars, archive status, last push date and latest release, falling back to the newest tag where a project publishes no releases, and counted the word “taint” in the README or named file to confirm each entry. Licences that GitHub could not identify were read from the licence file. Devirt classified 7 binary repositories as built mainly for taint tracking (libdft64, Taintgrind, Dytan, dynTaintTracer, drtaint, Dynamic Rabbits and WhiteRabbitTracker); the other binary entries are platforms where taint is one feature. What a tool analyzes and how it obtains taint come from each project's documentation. Some entries are modules of larger platforms (Ghidra, PANDA, BAP, CodeQL, Semgrep), so their stars and pushes describe the whole platform, not only its taint component. Left out: angr, whose README does not document taint analysis (two angr-based taint tools are included); Miasm, Qiling and S2E, whose READMEs do not mention taint analysis; Intel Pin, which is proprietary rather than open source; the original libdft, which is not on GitHub; and LLVM DataFlowSanitizer, whose repository is all of LLVM.
| Tool | How it obtains taint | Language | Licence | Stars | Last push | Last release or tag |
|---|---|---|---|---|---|---|
| libdft64 | Instrumented run (Intel Pin) | C++ | BSD-style | 273 | 21 Feb 2025 | None |
| Taintgrind | Instrumented run (Valgrind) | C | GPL-2.0 | 266 | 20 Jul 2026 | 15 Jun 2026 |
| Dytan | Instrumented run (Intel Pin) | C++ | None found | 46 | 7 Aug 2014 | None |
| dynTaintTracer | Instrumented run (DynamoRIO) | C | AGPL-3.0 | 41 | 30 Mar 2020 | None |
| drtaint | Instrumented run (DynamoRIO) | C++ | BSD-3-Clause | 21 | 10 Apr 2018 | None |
| Dynamic Rabbits | Instrumented run (DynamoRIO) | C | None found | 21 | 15 Feb 2022 | None |
| WhiteRabbitTracker | Instrumented run (Intel Pin, libdft) | C++ | LGPL-3.0 | 20 | 25 Jul 2021 | None |
| PinTools (Salwan) | Instrumented run (Intel Pin) | C++ | None found | 592 | 15 Feb 2022 | None |
| PANDA (taint2 plugin) | Whole-system emulation (QEMU) | C | GPL-2.0 | 2,799 | 11 Nov 2026 | 9 Jun 2026 |
| DECAF | Whole-system emulation (QEMU) | C | GPL-3.0 | 839 | 19 Nov 2024 | 30 Jul 2019 |
| Ghidra (TaintAnalysis module) | Emulation of lifted code (p-code) | Java | Apache-2.0 | 99,858 | 10 Nov 2026 | 22 Oct 2026 |
| BAP (taint plugins) | Emulation of lifted code (Primus) | OCaml | MIT | 2,263 | 7 May 2026 | 11 Jul 2022 |
| Triton | Emulation with symbolic execution | C++ | Apache-2.0 | 4,365 | 11 Nov 2026 | 9 Feb 2022 |
| BinCAT | Static (abstract interpretation) | OCaml | AGPL-3.0 | 1,882 | 25 Feb 2025 | 25 Feb 2025 |
| Karonte | Static (angr) | Python | BSD-2-Clause | 434 | 18 Sep 2021 | None |
| Operation Mango | Static (angr) | Python | BSD-2-Clause | 104 | 2 Sep 2026 | 17 Mar 2024 |
| Tool | How it obtains taint | Language | Licence | Stars | Last push | Last release or tag |
|---|---|---|---|---|---|---|
| PolyTracker | Instrumented run (LLVM, compile time) | C++ | Apache-2.0 | 602 | 10 Jun 2026 | 15 Sep 2022 |
| FlowDroid | Static (Android bytecode) | Java | LGPL-2.1 | 1,275 | 11 Nov 2026 | 23 Feb 2026 |
| Tai-e | Static (Java and Android bytecode) | Java | LGPL-3.0 | 1,832 | 29 Oct 2026 | 22 Jun 2026 |
| CodeQL | Static (QL queries on source) | CodeQL | MIT | 10,347 | 13 Nov 2026 | 29 Oct 2026 (tag) |
| Semgrep | Static (taint rules on source) | C | LGPL-2.1 | 17,631 | 13 Nov 2026 | 10 Nov 2026 |
| Pysa (Pyre) | Static (Python source) | OCaml | MIT | 7,181 | 26 Jun 2026 | 29 Oct 2024 |
| PhASAR | Static (LLVM IR) | C++ | MIT | 1,067 | 12 Nov 2026 | 24 Oct 2026 |
In both tables, “Last release or tag” is the latest GitHub release, or the newest tag where no release exists, and “None” means neither. The tool documentation is linked here rather than in the tables: libdft64, Taintgrind, Triton, BinCAT, FlowDroid and CodeQL's data-flow analysis.
What the count shows:
- Binary taint analysis is mostly dynamic. 13 of the 16 binary tools get taint by running or emulating the program. Intel Pin underlies 4 of them, DynamoRIO 3, QEMU 2 and Valgrind 1. The 3 static binary tools are BinCAT, an abstract interpreter for IDA, and Karonte and Operation Mango, which build on angr to look for vulnerabilities in firmware binaries.
- Most dedicated binary trackers have gone quiet. 10 of the 16 binary tools had no push in the 12 months before the count, including 6 of the 7 built mainly for taint tracking, and 7 had none in three years. All 7 bytecode and source tools had a push in the same 12 months, although Pysa's repository is now archived.
- The maintained binary taint engines sit inside platforms. PANDA, Triton and Ghidra, whose TaintAnalysis module adds taint tracking to its p-code emulator, were all pushed to in the week before the count. A team choosing a binary taint tracker today is more likely to inherit a platform than a standalone library.

Which kind of tool fits which question:
- Where does file or network input go in a Linux binary you can run? An instrumented tracker such as libdft64 or Taintgrind, or a whole-system emulator such as PANDA when the flow crosses processes or the kernel.
- Which code handles input in firmware you cannot run? A static binary tool such as BinCAT, Karonte or Operation Mango.
- Does an Android app leak private data? FlowDroid or Tai-e on the app's bytecode.
- Does your own source code pass user input to a SQL query unchecked? CodeQL, Semgrep or, for Python, Pysa.
- Which input bytes reach a branch, and what values would flip it? Triton, which pairs taint with symbolic execution.
Devirt's guide to reverse engineering tools places disassemblers, debuggers and instrumentation frameworks in the same workflow.
Taint analysis, symbolic execution and fuzzing
Taint analysis answers which instructions and values depend on an input; symbolic execution answers how they depend on it, by building formulas over the input that a solver can reason about. Schwartz, Avgerinos and Brumley note that the two can be combined to build formulas only for the parts of an execution that depend on tainted values.
Two tools in the count show the pairing. Triton combines a dynamic taint engine with dynamic symbolic execution in one library. Angora, a fuzzer presented at IEEE S&P 2018, uses byte-level taint tracking to learn which input bytes reach each branch before it searches for values that change the branch; its public release can track taint with libdft64 as an alternative to LLVM's DataFlowSanitizer.
What happens to taint analysis on a protected binary?
On a protected binary, taint analysis still follows the data, but protection changes what the data passes through. Packing mostly affects static taint analysis: the code a static tool would analyze is compressed or encrypted on disk, while a dynamic tracker watches the code that actually runs once the program has unpacked itself in memory.
Virtualization obfuscation changes more. A protector such as VMProtect or Themida turns selected functions into bytecode for a private virtual machine built into the file, as Devirt's VMProtect research explains. Input-derived values then flow through the virtual machine's handlers, while the dispatcher and the code that fetches and decodes bytecode run the same way for every input. A taint trace separates the two: it marks the handler operations that touch input and leaves most of the interpreter's own machinery, such as fetching and decoding bytecode, untainted. Salwan, Bardin and Potet (DIMVA 2018) built a devirtualization approach on that difference, combining taint analysis, symbolic execution and code simplification.
A taint trace narrows the search; it does not recover the protected function or prove what it does. It covers one execution, so input-dependent branches the run did not take stay unseen, which is why a recovered function can remain runtime-dependent, one of the four proof states a Devirt result uses. For files you are authorized to analyze, Devirt's protected binary analysis service recovers virtualized logic and reports every function in scope in a coverage ledger.
Where taint analysis is used
Taint analysis appears wherever someone needs to know what a piece of data can reach:
- Application security testing. Static analyzers such as CodeQL, Semgrep and Pysa flag user input that reaches a SQL query, a shell command or a file path without sanitization.
- Mobile privacy. FlowDroid's PLDI 2014 paper described a static taint analysis for Android apps that models the app lifecycle and the callbacks the Android framework invokes, and reported leaks found in Google Play and malware apps.
- Exploit detection. TaintCheck's tainted-jump checks stop a program before an input-derived value becomes a control-flow target.
- Malware analysis. WhiteRabbitTracker applies taint tracking to the evasion checks malware runs before it shows its real behavior, which matters in malware reverse engineering on samples that hide from sandboxes.
- Firmware vulnerability discovery. Karonte looks for insecure interactions between the binaries of embedded firmware, and Operation Mango runs taint-style static analysis on binary firmware services.
- Fuzzing. Angora uses taint to decide which input bytes to mutate.
Questions about taint analysis
What does tainted data mean?
Tainted data is any value that came from a taint source, or was computed from one, and has not passed through a sanitizer. In a web application that usually means user input; in a binary, it means the bytes returned by calls such as read or recv, and every register and memory cell later computed from them.
Is taint analysis the same as taint checking?
Taint checking is an older name for the same idea, used by Perl's taint mode and by the Wikipedia article on the subject. Taint tracking is another common name, and the paper behind PANDA's taint system calls it dynamic information flow tracking.
Does taint analysis need source code?
Taint analysis does not need source code. Static taint analyzers such as CodeQL and Semgrep work on source code, FlowDroid and Tai-e work on bytecode, and dynamic taint trackers such as libdft64, Taintgrind and PANDA work on compiled binaries while they run. BinCAT, Karonte and Operation Mango analyze binary code statically.
How slow is dynamic taint analysis?
Dynamic taint analysis typically slows a program several times. libdft's authors measured 1.14 to 6.03 times on command-line utilities in 2012, and whole-system trackers add the cost of emulating the machine, which is one reason PANDA pairs its taint system with record and replay, so a recorded execution can be analyzed again without rerunning the program live.
For protected or ordinary binaries you are authorized to analyze, Devirt reports what it recovered and what stayed unproven. Upload only files you have the right to analyze; the acceptable use policy sets out what Devirt accepts.