CVE-2021-42574
Oracle Unicode Bidirectional Algorithm Code Injection Vulnerability
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.
INFO
Published Date :
Nov. 1, 2021, 4:15 a.m.
Last Modified :
Nov. 21, 2024, 6:27 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
Affected Products
The following products are affected by CVE-2021-42574
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 2.0 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | HIGH | [email protected] |
Solution
- Update all affected packages to resolve the vulnerability.
- For Nutanix, upgrade AOS and AHV software as recommended.
- For GitLab, upgrade to a patched version or later.
- For ZTE CGSL, contact vendor for updated packages.
Public PoC/Exploit Available at Github
CVE-2021-42574 has a 33 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2021-42574.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2021-42574 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2021-42574
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
🛡️ ScriptGuard — Authoring guardrails for complex scripts. Real-time bidi, ligature, syllable & register violation detection across 20+ writing systems.
JavaScript TypeScript HTML CSS
Fast, Configurable Code Security Scanner | Detect secrets, exploits, weak crypto, and unicode attacks across your entire codebase in seconds.
Rust
Pre-commit hook to detect and fix non-ASCII Unicode characters (smart quotes, invisible chars, Trojan Source attacks)
linting pre-commit python security trojan-source unicode
Python
Fused repository trust analyzer + SKILL.md content security checker
Go Python
Uses CrewAI Multi Agentic System to showcase memory poisoning with RAG workflow for a zero click RCE.
HTML Open Policy Agent Python
Text/encoding file inspector — find invisible characters, homoglyphs, BiDi attacks, encoding issues, mixed line endings. Zero dependencies, pure Python, single file.
Python
ccb-core plugin for Claude Code - extracted from cc-boilerplate-v2 monorepo
Shell Python
Security scanner for AI IDE configuration files (.cursorrules, .vscode/settings.json) - detects Unicode obfuscation + risky patterns
ai-security cursor cve devsecops python scanner security supply-chain-security vscode vulnerability-scanner
Python
Unicleaner is a security-focused CLI tool that scans source code repositories to detect potentially malicious Unicode characters that could hide backdoors or exploits
Shell Rust Nix Python Just
Real-time security scanner that detects Unicode steganography, invisible characters, and code obfuscation patterns in extensions and source code.
JavaScript
Tam-ma an autonomous development orchestration platform that manages complete development workflows from issue assignment to production deployment.
JavaScript TypeScript HTML CSS Shell PLpgSQL C# Dockerfile PowerShell
None
HTML Rust CSS Shell
All CVE - PoC in GitHub
poc proofofconcept tester allcve cvegithub cvenew cvepoc cveupdate
None
None
asp-net-core csharp docker dockerfile javascript react webapi docker-compose
C# Dockerfile HTML JavaScript CSS
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2021-42574 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2021-42574 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/1 Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/4 Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/5 Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/6 Added Reference http://www.openwall.com/lists/oss-security/2021/11/02/10 Added Reference http://www.unicode.org/versions/Unicode14.0.0/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IH2RG5YTR6ZZOLUV3EUPZEIJR7XHJLVD/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LQNTFF24ROHLVPLUOEISBN3F7QM27L4U/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QUPA37D57VPTDLSXOOGF4UXUEADOC4PQ/ Added Reference https://security.gentoo.org/glsa/202210-09 Added Reference https://trojansource.codes Added Reference https://www.kb.cert.org/vuls/id/999008 Added Reference https://www.scyon.nl/post/trojans-in-your-source-code Added Reference https://www.starwindsoftware.com/security/sw-20220804-0002/ Added Reference https://www.unicode.org/reports/tr31/ Added Reference https://www.unicode.org/reports/tr36/ Added Reference https://www.unicode.org/reports/tr39/ Added Reference https://www.unicode.org/reports/tr9/tr9-44.html#HL4 -
CVE Modified by [email protected]
Aug. 04, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Jun. 11, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
May. 17, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Apr. 11, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Mar. 21, 2024
Action Type Old Value New Value Added Tag MITRE disputed -
CVE Modified by [email protected]
Nov. 07, 2023
Action Type Old Value New Value Changed Description ** DISPUTED ** 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. 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. Added Reference MITRE https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QUPA37D57VPTDLSXOOGF4UXUEADOC4PQ/ [No types assigned] Added Reference MITRE https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LQNTFF24ROHLVPLUOEISBN3F7QM27L4U/ [No types assigned] Added Reference MITRE https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IH2RG5YTR6ZZOLUV3EUPZEIJR7XHJLVD/ [No types assigned] Removed Reference MITRE https://lists.fedoraproject.org/archives/list/[email protected]/message/QUPA37D57VPTDLSXOOGF4UXUEADOC4PQ/ Removed Reference MITRE https://lists.fedoraproject.org/archives/list/[email protected]/message/LQNTFF24ROHLVPLUOEISBN3F7QM27L4U/ Removed Reference MITRE https://lists.fedoraproject.org/archives/list/[email protected]/message/IH2RG5YTR6ZZOLUV3EUPZEIJR7XHJLVD/ -
Modified Analysis by [email protected]
Oct. 25, 2022
Action Type Old Value New Value Changed Reference Type https://security.gentoo.org/glsa/202210-09 No Types Assigned https://security.gentoo.org/glsa/202210-09 Third Party Advisory Changed Reference Type https://www.starwindsoftware.com/security/sw-20220804-0002/ No Types Assigned https://www.starwindsoftware.com/security/sw-20220804-0002/ Third Party Advisory Added CPE Configuration OR *cpe:2.3:a:starwindsoftware:starwind_virtual_san:v8r13:14398:*:*:*:*:*:* -
CVE Modified by [email protected]
Oct. 16, 2022
Action Type Old Value New Value Added Reference https://security.gentoo.org/glsa/202210-09 [No Types Assigned] -
CVE Modified by [email protected]
Oct. 11, 2022
Action Type Old Value New Value Added Reference https://www.starwindsoftware.com/security/sw-20220804-0002/ [No Types Assigned] -
Modified Analysis by [email protected]
Sep. 03, 2022
Action Type Old Value New Value Changed Reference Type https://www.unicode.org/reports/tr31/ No Types Assigned https://www.unicode.org/reports/tr31/ Technical Description, Vendor Advisory Changed Reference Type https://www.unicode.org/reports/tr36/ No Types Assigned https://www.unicode.org/reports/tr36/ Technical Description, Vendor Advisory Changed Reference Type https://www.unicode.org/reports/tr39/ No Types Assigned https://www.unicode.org/reports/tr39/ Technical Description, Vendor Advisory Changed Reference Type https://www.unicode.org/reports/tr9/tr9-44.html#HL4 No Types Assigned https://www.unicode.org/reports/tr9/tr9-44.html#HL4 Technical Description, Vendor Advisory -
CVE Modified by [email protected]
May. 12, 2022
Action Type Old Value New Value Changed 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. ** DISPUTED ** 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. Added Reference https://www.unicode.org/reports/tr36/ [No Types Assigned] Added Reference https://www.unicode.org/reports/tr9/tr9-44.html#HL4 [No Types Assigned] Added Reference https://www.unicode.org/reports/tr31/ [No Types Assigned] Added Reference https://www.unicode.org/reports/tr39/ [No Types Assigned] -
Modified Analysis by [email protected]
Nov. 30, 2021
Action Type Old Value New Value Changed Reference Type https://www.scyon.nl/post/trojans-in-your-source-code No Types Assigned https://www.scyon.nl/post/trojans-in-your-source-code Exploit, Mitigation, Third Party Advisory -
CVE Modified by [email protected]
Nov. 26, 2021
Action Type Old Value New Value Added Reference https://www.scyon.nl/post/trojans-in-your-source-code [No Types Assigned] -
Modified Analysis by [email protected]
Nov. 16, 2021
Action Type Old Value New Value Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism Removed CVSS V2 NIST (AV:N/AC:L/Au:N/C:P/I:P/A:P) Added CVSS V2 NIST (AV:N/AC:H/Au:N/C:P/I:P/A:P) Removed CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Added CVSS V3.1 NIST AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H Changed Reference Type http://www.openwall.com/lists/oss-security/2021/11/02/10 No Types Assigned http://www.openwall.com/lists/oss-security/2021/11/02/10 Mailing List Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/IH2RG5YTR6ZZOLUV3EUPZEIJR7XHJLVD/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/IH2RG5YTR6ZZOLUV3EUPZEIJR7XHJLVD/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/LQNTFF24ROHLVPLUOEISBN3F7QM27L4U/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/LQNTFF24ROHLVPLUOEISBN3F7QM27L4U/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/QUPA37D57VPTDLSXOOGF4UXUEADOC4PQ/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/QUPA37D57VPTDLSXOOGF4UXUEADOC4PQ/ Mailing List, Third Party Advisory Changed Reference Type https://www.kb.cert.org/vuls/id/999008 No Types Assigned https://www.kb.cert.org/vuls/id/999008 Third Party Advisory, US Government Resource Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* -
CVE Modified by [email protected]
Nov. 11, 2021
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/IH2RG5YTR6ZZOLUV3EUPZEIJR7XHJLVD/ [No Types Assigned] -
CVE Modified by [email protected]
Nov. 09, 2021
Action Type Old Value New Value Added Reference https://www.kb.cert.org/vuls/id/999008 [No Types Assigned] -
CVE Modified by [email protected]
Nov. 05, 2021
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/LQNTFF24ROHLVPLUOEISBN3F7QM27L4U/ [No Types Assigned] -
CVE Modified by [email protected]
Nov. 04, 2021
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/QUPA37D57VPTDLSXOOGF4UXUEADOC4PQ/ [No Types Assigned] -
CVE Modified by [email protected]
Nov. 03, 2021
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2021/11/02/10 [No Types Assigned] -
Initial Analysis by [email protected]
Nov. 02, 2021
Action Type Old Value New Value Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:P/I:P/A:P) Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Changed Reference Type http://www.openwall.com/lists/oss-security/2021/11/01/1 No Types Assigned http://www.openwall.com/lists/oss-security/2021/11/01/1 Exploit, Mailing List, Mitigation, Third Party Advisory Changed Reference Type http://www.openwall.com/lists/oss-security/2021/11/01/4 No Types Assigned http://www.openwall.com/lists/oss-security/2021/11/01/4 Exploit, Mailing List, Third Party Advisory Changed Reference Type http://www.openwall.com/lists/oss-security/2021/11/01/5 No Types Assigned http://www.openwall.com/lists/oss-security/2021/11/01/5 Mailing List, Third Party Advisory Changed Reference Type http://www.openwall.com/lists/oss-security/2021/11/01/6 No Types Assigned http://www.openwall.com/lists/oss-security/2021/11/01/6 Mailing List, Third Party Advisory Changed Reference Type http://www.unicode.org/versions/Unicode14.0.0/ No Types Assigned http://www.unicode.org/versions/Unicode14.0.0/ Release Notes, Vendor Advisory Changed Reference Type https://trojansource.codes No Types Assigned https://trojansource.codes Exploit, Technical Description, Third Party Advisory Added CWE NIST CWE-94 Added CPE Configuration OR *cpe:2.3:a:unicode:unicode:*:*:*:*:*:*:*:* versions up to (excluding) 14.0.0 -
CVE Modified by [email protected]
Nov. 01, 2021
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/5 [No Types Assigned] Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/6 [No Types Assigned] -
CVE Modified by [email protected]
Nov. 01, 2021
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/4 [No Types Assigned] -
CVE Modified by [email protected]
Nov. 01, 2021
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2021/11/01/1 [No Types Assigned]