CVE-2021-42574An issue was discovered in the Bidirectional Algorithm in the Unicode Specification through 14.0. It permits the visual reordering of…
- 8.3HighCVSS base score
- 12.9%Exploitation in 30 daysEPSS · top 3.6% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By mitre
- 14 days later
· 14 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | High8.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 12.9% · top 3.6% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.3.
Affected products
n/a
- affected n/a
References
References18
- http://www.unicode.org/versions/Unicode14.0.0/ (opens in a new tab)x_transferred
- https://trojansource.codes (opens in a new tab)x_transferred
- [oss-security] 20211101 CVE-2021-42574: rustc 1.56.0 and bidirectional-override codepoints in source code (opens in a new tab)mailing-listx_transferred
- [oss-security] 20211101 Re: CVE-2021-42574: rustc 1.56.0 and bidirectional-override codepoints in source code (opens in a new tab)mailing-listx_transferred
- [oss-security] 20211101 Trojan Source Attacks (opens in a new tab)mailing-listx_transferred
- [oss-security] 20211102 Re: CVE-2021-42574: rustc 1.56.0 and bidirectional-override codepoints in source code (opens in a new tab)mailing-listx_transferred
- [oss-security] 20211102 Re: Trojan Source Attacks (opens in a new tab)mailing-listx_transferred
- FEDORA-2021-0578e23912 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-7ad3a01f6a (opens in a new tab)vendor-advisoryx_transferred
- VU#999008 (opens in a new tab)third-party-advisoryx_transferred
- FEDORA-2021-443139f67c (opens in a new tab)vendor-advisoryx_transferred
- https://www.scyon.nl/post/trojans-in-your-source-code (opens in a new tab)x_transferred
- https://www.unicode.org/reports/tr36/ (opens in a new tab)x_transferred
- https://www.unicode.org/reports/tr39/ (opens in a new tab)x_transferred
- https://www.unicode.org/reports/tr31/ (opens in a new tab)x_transferred
- https://www.unicode.org/reports/tr9/tr9-44.html#HL4 (opens in a new tab)x_transferred
- https://www.starwindsoftware.com/security/sw-20220804-0002/ (opens in a new tab)x_transferred
- GLSA-202210-09 (opens in a new tab)vendor-advisoryx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-29541 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-42574)Record last updated .