Exploit database

Vulnerability

CVE-2021-42574

Vulnerability details

Score
8.3
Severity
high

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

Description

An issue was discovered in the Bidirectional Algorithm in the Unicode Specification through 14.0. It permits the visual reordering of characters via control sequences, which can be used to craft source code that renders different logic than the logical ordering of tokens ingested by compilers and interpreters. Adversaries can leverage this to encode source code for compilers accepting Unicode such that targeted vulnerabilities are introduced invisibly to human reviewers. NOTE: the Unicode Consortium offers the following alternative approach to presenting this concern. An issue is noted in the nature of international text that can affect applications that implement support for The Unicode Standard and the Unicode Bidirectional Algorithm (all versions). Due to text display behavior when text includes left-to-right and right-to-left characters, the visual order of tokens may be different from their logical order. Additionally, control characters needed to fully support the requirements of bidirectional text can further obfuscate the logical order of tokens. Unless mitigated, an adversary could craft source code such that the ordering of tokens perceived by human reviewers does not match what will be processed by a compiler/interpreter/etc. The Unicode Consortium has documented this class of vulnerability in its document, Unicode Technical Report #36, Unicode Security Considerations. The Unicode Consortium also provides guidance on mitigations for this class of issues in Unicode Technical Standard #39, Unicode Security Mechanisms, and in Unicode Standard Annex #31, Unicode Identifier and Pattern Syntax. Also, the BIDI specification allows applications to tailor the implementation in ways that can mitigate misleading visual reordering in program text; see HL4 in Unicode Standard Annex #9, Unicode Bidirectional Algorithm.

CVE Program

Exploit source choices

11 sources
simplylu/cve-2021-42574
GH-ed279b422a6defb6f32766d8c2ac405cGitHubUnofficial GitHub sourcePreferred

Generate malicious files using recently published bidi-attack (CVE-2021-42574)

2021-11-0221 files · 8 stars
maweil/bidi_char_detector
GH-0de728f43b1c0576bf4922a0c305c86dGitHubUnofficial GitHub source

Checks your files for existence of Unicode BIDI characters which can be misused for supply chain attacks. See CVE-2021-42574

2021-11-0614 files · 6 stars
moshe-ship/bidi-guard
GH-b71b39dbc095f3c66687ec048fde4bbdGitHubUnofficial GitHub source

Scan code for invisible bidirectional Unicode characters (Trojan Source attack prevention, CVE-2021-42574)

2026-03-2118 files · 5 stars
rakib-nyc/nullorigin
GH-de79f9bc167cd9df0000aa805acd65baGitHubUnofficial GitHub source

Research-only AI watermark & provenance robustness toolkit: local reverse proxy (OpenAI/Anthropic/Gemini) + CLI stripping C2PA/EXIF/XMP, zero-width & homoglyph Unicode, KGW text watermarks, DWT/Tree-Ring image stego, AudioSeal, PDF/DOCX/PPTX/XLSX metadata, and Trojan Source (CVE-2021-42574) code scanning.

2026-08-1654 files · 5 stars
tin-z/solidity_cve-2021-42574-poc
GH-04071cd6b4a94231203a4750637a5239GitHubUnofficial GitHub source

POC of CVE-2021-42574 for solidity and solc compiler

2023-01-318 files · 3 stars
bottlerocketstudios/android-customlintrules
GH-1dab12d884dc69aa762e8a356847a253GitHubUnofficial GitHub source

Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner, detect and mitigate possible security issues, and allow us to write rules around best practices and usage as necessary in the future

2022-02-0973 files · 2 stars
bittide/aegir
GH-0a24332bfd839f86c412d9c37d6d4f60GitHubUnofficial GitHub source

Bittide aegir simulator

2023-03-09149 files · 1 stars
kishan-shah12/personal-data-leak-detector
GH-1323fc906ccc61e43777a8b3efe6c1aaGitHubUnofficial GitHub source

Dual-engine cybersecurity matrix for sensitive data leak detection (API keys, PII, Luhn-verified cards) and safe in-memory malware & invisible steganography quarantine (CVE-2021-42574, zero-width chars, disguised binaries) with an interactive 3D Three.js WebGL HUD.

2026-10-1235 files · 1 stars
sotiak/cve-2021-42574
GH-d560273b66bcd9ec839569f75e49d877GitHubUnofficial GitHub source

sotiak/cve-2021-42574 source repository

2021-11-016 files · 1 stars
waseeld/cve-2021-42574
GH-de0f5e274af1fd4acf020f8978e3e952GitHubUnofficial GitHub source

waseeld/cve-2021-42574 source repository

2021-12-114 files · 1 stars