CVE-2021-42694

HIGH

Unicode < 14.0.0 - Code Injection via Homoglyph Identifier Spoofing

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 3 public exploits for CVE-2021-42694. PoCs published by simplylu, k271266.

AI-analyzed exploit summary This repository provides a tool to generate Trojan Source attacks using Unicode homoglyphs (CVE-2021-42694). The `codegen.py` script replaces placeholder characters in input files with visually identical Unicode homoglyphs to create deceptive code.

Description

An issue was discovered in the character definitions of the Unicode Specification through 14.0. The specification allows an adversary to produce source code identifiers such as function names using homoglyphs that render visually identical to a target identifier. Adversaries can leverage this to inject code via adversarial identifier definitions in upstream software dependencies invoked deceptively in downstream software. 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 (all versions). Unless mitigated, an adversary could produce source code identifiers using homoglyph characters that render visually identical to but are distinct from a target identifier. In this way, an adversary could inject adversarial identifier definitions in upstream software that are not detected by human reviewers and are invoked deceptively in downstream software. The Unicode Consortium has documented this class of security 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.

Exploits (3)

nomisec WORKING POC 18 stars
by simplylu · poc
https://github.com/simplylu/CVE-2021-42694

This repository provides a tool to generate Trojan Source attacks using Unicode homoglyphs (CVE-2021-42694). The `codegen.py` script replaces placeholder characters in input files with visually identical Unicode homoglyphs to create deceptive code.

Classification
Working Poc 95%
Attack Type
Other
Complexity
Moderate
Reliability
Reliable
Target: Multiple (C, C++, C#, Go, Python, Rust, JS, etc.)
No auth needed
Prerequisites: Input file with homoglyph placeholders · Python 3 environment
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER
by k271266 · poc
https://github.com/k271266/CVE-2021-42694

This repository provides a Python-based tool to detect homoglyph (visually similar Unicode characters) attacks in code, specifically targeting CVE-2021-42694. It scans Python files for suspicious identifiers that may contain homoglyphs, which could be used for code obfuscation or malicious injections.

Classification
Scanner 95%
Attack Type
Other
Complexity
Moderate
Reliability
Reliable
Target: Python codebases (any version)
No auth needed
Prerequisites: Access to the target codebase · Python environment to run the scanner
devstral-2 · analyzed Feb 16, 2026 Full analysis →
inthewild WORKING POC
poc
https://github.com/js-on/cve-2021-42694

This repository contains a functional proof-of-concept tool for CVE-2021-42694, which exploits Unicode homoglyphs to create visually identical but malicious code identifiers. The tool generates obfuscated code by replacing characters in templates with homoglyphs, demonstrating the vulnerability in multiple programming languages.

Classification
Working Poc 95%
Attack Type
Other
Complexity
Moderate
Reliability
Reliable
Target: Multiple programming languages (C, C++, C#, Go, Python, Rust, JS, etc.)
No auth needed
Prerequisites: Template file with homoglyph placeholders · Python 3 environment
devstral-2 · analyzed Feb 23, 2026 Full analysis →

References (10)

Core 10
Core References
Mailing List, Third Party Advisory mailing-list
http://www.openwall.com/lists/oss-security/2021/11/01/1
Mailing List, Third Party Advisory mailing-list
http://www.openwall.com/lists/oss-security/2021/11/01/6
Third Party Advisory, US Government Resource third-party-advisory
https://www.kb.cert.org/vuls/id/999008
Third Party Advisory vendor-advisory
https://security.gentoo.org/glsa/202210-09
Release Notes, Vendor Advisory
http://www.unicode.org/versions/Unicode14.0.0/
Third Party Advisory
https://trojansource.codes
Technical Description, Vendor Advisory
https://www.unicode.org/reports/tr36/
Technical Description, Vendor Advisory
https://www.unicode.org/reports/tr39/

Scores

CVSS v3 8.3
EPSS 0.1245
EPSS Percentile 94.1%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact total

Details

CWE
CWE-94
Status published
Products (1)
unicode/unicode < 14.0.0
Published Nov 01, 2021
Tracked Since Feb 18, 2026