ToolsT-11 · Unicode TR39 & AST ReDoS Lab
Unicode Trojan Source & Regex ReDoS Forensics
Detect CVE-2021-42574 Trojan Source bidirectional overrides (U+202A–U+202E, U+2066–U+2069), invisible zero-width and Plane-14 tag watermarks, and Unicode TR39 Cyrillic or Greek homoglyph confusables with exact UTF-8 and UTF-16 hex inspection and one-click sanitization—plus static AST Regex ReDoS backtracking analysis and safe bounded execution in browser RAM.
CLIENT-SIDE · ZERO UPLOAD
Threat Level
—
BiDi Controls
0
Invisible / Plane-14
0
Homoglyphs
0
Escaped Forensic Skeleton View (Reveals Hidden Control Codepoints Inline)
UTF-8 / UTF-16 Codepoint Hex Table
| Pos | Codepoint | UTF-8 Bytes | UTF-16 Units | Classification |
|---|
2. Static Regex ReDoS Analyzer & Safe Bounded Tester
AST Nested-Quantifier & Alternation CheckCatastrophic Backtracking Time Complexity
When a backtracking NFA evaluates an ambiguous nested quantifier such as (a+)+$ against an unmatched string of length n followed by a failing character, every boundary partition is explored before halting:
Related tools: compare Winnowing & Homoglyph Studio or PDF Metadata Inspector.
Unicode & ReDoS Forensic Taxonomy
| Vector Class | Exact Ranges / Pattern | Primary Impact |
|---|---|---|
| Trojan Source BiDi | U+202A..202E, U+2066..2069 | Visual token reordering vs AST execution |
| Zero-Width / Tags | U+200B..200D, U+E0000..E007F | Invisible watermarks & hidden prompts |
| TR39 Confusables | Cyrillic / Greek mixed script | IDN phishing & identifier spoofing |
| ReDoS Star-Height ≥ 2 | (a+)+, (a|aa)+, \w+\d+ | Exponential / polynomial CPU exhaustion |
- NIST NVD — CVE-2021-42574 Trojan Source Bidirectional Text Vulnerability
- Unicode Technical Report #36 — Unicode Security Considerations
- Unicode Technical Standard #39 — Unicode Security Mechanisms (Confusables)
- Boucher & Anderson — Trojan Source: Invisible Vulnerabilities
- OWASP — Regular Expression Denial of Service (ReDoS)
[FAQ // VERIFIED SPECIFICATION]
Unicode Trojan Source & ReDoS Forensics FAQ
04 ENTRIES · VISIBLE DOM PARITY
- How does CVE-2021-42574 (Trojan Source) hide malicious logic inside readable code?
- Unicode bidirectional control characters such as Right-to-Left Override (U+202E) and directional isolates (U+2066–U+2069) cause code editors and diff viewers to display tokens in a different visual order than the logical byte stream parsed by compilers and interpreters, disguising active statements inside apparent comments or string literals.
- Which invisible Unicode characters are used for text watermarking or hidden payloads?
- Zero-width characters (U+200B ZWSP, U+200C ZWNJ, U+200D ZWJ, U+2060, U+FEFF), Variation Selectors (U+FE00–U+FE0F), and Unicode Plane-14 Tag characters (U+E0000–U+E007F) render with zero visual width while surviving copy-paste and encoding arbitrary ASCII or binary watermarks.
- What causes catastrophic Regular Expression Denial of Service (ReDoS)?
- Backtracking regex engines exhibit exponential O(2^n) worst-case runtime when an outer unbounded quantifier wraps an inner quantifier (like (a+)+) or overlapping alternation branches (like (a|aa)+). On mismatch, the engine tries exponentially many partitions of the input prefix before failing.
- Does the bounded Regex tester freeze the browser on dangerous ReDoS patterns?
- No. Static AST analysis runs first; if it detects CRITICAL exponential backtracking risk and the probe input exceeds 22 characters, the tester refuses unbounded execution and instead measures a safe prefix scaling curve (n = 8..20) in milliseconds.