From the archive
Researchers discover a Unicode security vulnerability that affects most code compilers, including for Go, C++, C#, JavaScript, Java, Rust, and Python
Virtually all compilers — programs that transform human-readable source code into computer-executable machine code …
Context & ripple effects
The disclosure cuts across the language ecosystems that developers use to build and review software, rather than isolating risk in a single runtime or platform. It arrives as Go has become more relevant to malicious-code authors, with coverage documenting rapid growth in Go-based malware and broader use of “exotic” languages to complicate analysis.
The related coverage also shows Google expanding vulnerability records across Python, Rust, Go and other open-source projects through its broadened Open Source Vulnerabilities database. A compiler-spanning issue raises the value of security checks that operate across those ecosystems.
First-order effects
- Maintainers and users of compilers for Go, C++, C#, JavaScript, Java, Rust and Python must assess whether Unicode-bearing source can create a mismatch between what reviewers read and what their tools process.
- Security teams reviewing repositories in those languages gain a common code-review and build-pipeline concern, rather than a language-specific vulnerability to triage.
Second-order effects
- Google's cross-project vulnerability database becomes a more relevant distribution point for affected open-source projects, while package maintainers face pressure to identify and remediate exposed source code.
- Malware authors already adopting Go and other less-familiar languages to hamper analysis gain another reason for defenders to treat source readability and compiler behavior as part of the same review process.
Third-order effects
- If compiler and repository tooling standardizes defenses against ambiguous Unicode source, secure development practices will shift further from language-specific patching toward controls shared across the software supply chain.
- The episode strengthens a longer-running divide between code that is syntactically accepted by a toolchain and code that can be reliably interpreted by human reviewers, making tool-assisted source inspection more central.
The trend: Software security is expanding from vulnerabilities in running code to risks introduced by the gap between source-code representation, human review and multi-language build tools.
Related: Dual-use code intelligence · Proof-carrying security report · Python · JavaScript · Google expands Open Source Vulnerabilities database · Malware developers adopt exotic programming languages
Related coverage
- On “Trojan Source” Attacks
- Trojan Source: Invisible Vulnerabilities
- View article
- Pretty Much All Computer Code Can Be Hijacked by Newly Discovered ‘Trojan Source’ Exploit
- Trojan Source attack method allows hiding flaws in source code
More related coverage
- Newly Discovered ‘Trojan Source’ Exploit Can Hijack All Computer Codes
- ‘Trojan Source’ technique can inject malware into source code without detection
- ‘Trojan Source’ attack method can hide bugs into open-source code
- New ‘Trojan Source’ Technique Lets Hackers Hide Vulnerabilities in Source Code
- This Unicode bug threatens the security of all source code
- View article
- New ‘Trojan Source’ Method Lets Attackers Hide Vulns in Source Code
- ‘Trojan Source’ Hides Invisible Bugs in Source Code
- Businesses and governments urged to take action over Trojan Source supply chain attacks
- Trojan Source attack lets hackers exploit source code
- ‘Trojan Source’ Attack Abuses Unicode to Inject Vulnerabilities Into Code
- Programming languages: This sneaky trick could allow attackers to hide ‘invisible’ vulnerabilities in code
- New Trojan Source attack impacts compilers for most programming languages
- Security advisory for rustc (CVE-2021-42574)
- Overview — We present a new type of attack in which source code is maliciously encoded …
Discussion
GCC & LLVM Patches Pending To Fend Off Trojan Source Attacks
Rust has a nice clear advisory for today's CVE-2021-42574/42694 “Trojan Source” vulns. Lints sound good, but I'm unconvinced this is something we can fix in compilers. For example, here's a “0day bypass”. if access_level != “usеr” { That е is a CYRILLIC SMALL LETTER IE 🤷♂️ https…
Virtually all compilers are vulnerable to an insidious attack in which an adversary can introduce targeted vulnerabilities into any software without being detected, new research warns. Rust has already released fixes. More are coming. #trojansource https://krebsonsecurity.com/ ..…