What is a Trojan Source (CVE-2021-42574) attack?
Trojan Source uses invisible Unicode bidirectional controls like U+202E (RLO) and U+2066–U+2069 isolates to make source code display differently to human reviewers than how the compiler parses it.
Scan pull requests, config files, and pasted documents for hidden Unicode bidirectional overrides (U+202E RLO, U+202A–U+202D, U+2066–U+2069, LRM/RLM) that visually reorder code or spoof filenames.
Bidi marks (LRM/RLM) can be legitimate in mixed-direction Arabic or Hebrew paragraphs, whereas they are almost never legitimate inside source code or English strings. Inspect every flagged offset before stripping.
Detected codepoints in current buffer:
U+2066 LEFT-TO-RIGHT ISOLATE × 2U+202E RIGHT-TO-LEFT OVERRIDE (RLO) × 1U+2069 POP DIRECTIONAL ISOLATE × 1| Pos | UTF-16 | Glyph | Hex | UTF-8 Bytes | Category & Name |
|---|---|---|---|---|---|
| #25 | 25 | ∅ | U+202E | E2 80 AE | RIGHT-TO-LEFT OVERRIDE (RLO) (Cf · Bidi Control) |
| #27 | 27 | ∅ | U+2066 | E2 81 A6 | LEFT-TO-RIGHT ISOLATE (Cf · Bidi Control) |
| #45 | 45 | ∅ | U+2069 | E2 81 A9 | POP DIRECTIONAL ISOLATE (Cf · Bidi Control) |
| #47 | 47 | ∅ | U+2066 | E2 81 A6 | LEFT-TO-RIGHT ISOLATE (Cf · Bidi Control) |
Removing invisible Unicode strips literal hidden codepoints, but it never alters statistical token patterns in the visible wording. Run an optional authorized sentence-level rewrite below (numbers, URLs, emails, code spans, and quotes are placeholder-protected), or compare Pro, Scale bearer-API, and one-time character packs.
Checking your session…
Every directional override, embedding, and isolate below is invisible yet alters how editors render character order.
| Hex Codepoint | Unicode Name | How It Enters LLM / Pasted Text | Editor, ATS & Code Breakage Impact |
|---|---|---|---|
U+202E | RIGHT-TO-LEFT OVERRIDE (RLO) | Used in Trojan Source code spoofing and malicious filename extension tricks. | Reverses rendered text order so executable code looks commented out or .exe looks like .pdf. |
U+2066 – U+2069 | DIRECTIONAL ISOLATES (LRI / RLI / FSI / PDI) | Used to scope directional runs; abused in CVE-2021-42574 to close visual spoofing cleanly. | Hides logic mismatches between human code review and compiler token streams. |
U+200E / U+200F | LEFT-TO-RIGHT & RIGHT-TO-LEFT MARKS (LRM / RLM) | Copied from WhatsApp, Telegram, Excel, or mixed-language CRM exports. | Breaks phone number regexes, date parsers, and exact string matching in databases. |
U+202A – U+202D | BIDI EMBEDDINGS & POP (LRE / RLE / PDF / LRO) | Legacy Unicode directional formatting controls still honored by editors and browsers. | Causes unpredictable cursor jumping and visual reordering in IDE diff viewers. |
Trojan Source uses invisible Unicode bidirectional controls like U+202E (RLO) and U+2066–U+2069 isolates to make source code display differently to human reviewers than how the compiler parses it.
Review carefully before stripping in RTL languages—LRM (U+200E) and RLM (U+200F) often keep numbers and punctuation ordered properly in Arabic or Hebrew prose. Uncheck the Bidi box to inspect without deleting.
Messaging apps frequently wrap phone numbers and timestamps with invisible U+200E (LRM) or U+202A/U+202C embeddings. Stripping Bidi controls restores clean ASCII digits immediately.
No. Codepoint inspection and sanitization run strictly locally inside your browser tab.
Strip invisible soft hyphens (U+00AD) and Word Joiners (U+2060) copied from PDFs, ebooks, and academic papers.
Open toolU+E0000–U+E007F · ASCII DecoderDecode hidden ASCII messages and invisible prompt injections encoded inside Plane-14 Unicode Tags (U+E0000–U+E007F).
Open toolEssays · Citations · LaTeX/WordSanitize essays, theses, and bibliography citations of PDF soft hyphens, NBSP, zero-width spaces, and homoglyphs.
Open toolATS · Resume · Skills MatchStrip ATS-breaking zero-width spaces, PDF soft hyphens, and non-breaking spaces from resumes and cover letters.
Open toolSEO · Slugs · Meta TagsClean blog drafts, meta titles, descriptions, and URL slugs of zero-width spaces, NBSP, BOM, and stray tags before publishing.
Open toolJSON · YAML · Python · JSFix SyntaxError, IndentationError, and JSON.parse crashes caused by invisible U+200B, NBSP, BOM, curly quotes, and Bidi bytes.
Open toolBrowse the full Unicode detector directory, read how zero-width cleanup preserves emoji, or compare Pro & API character allowances.