# Researchers discover a Unicode security vulnerability that affects most code compilers, including for Go, C++, C#, JavaScript, Java, Rust, and Python

Researchers found a Unicode security vulnerability affecting compilers for Go, C++, C#, JavaScript, Java, Rust and Python.

Record as of 2 November 2021. Labels written by Codex, for review. JSON: <https://texxr.com/v3/article/972455.json>

## Researchers discover a Unicode security vulnerability that affects most code compilers, including for Go, C++, C#, JavaScript, Java, Rust, and Python

*as of 2 November 2021; judged by one reader, needs review*

**In one line:** The publisher’s headline and the coverage around it.

Krebs on Security · Brian Krebs · [2 November 2021](/2021/11/02) · [Read original](https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/)

Virtually all compilers — programs that transform human-readable source code into computer-executable machine code …

**Context**

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](/1160164) and broader use of “exotic” languages to complicate analysis.

The related coverage also shows Google expanding vulnerability records across [Python](/entity/python), Rust, Go and other open-source projects through its [broadened Open Source Vulnerabilities database](/967826). 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](/entity/javascript), [Java](/entity/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](/concepts#dual-use-code-intelligence) · [Proof-carrying security report](/concepts#proof-carrying-security-report) · [Python](/entity/python) · [JavaScript](/entity/javascript) · [Google expands Open Source Vulnerabilities database](/967826) · [Malware developers adopt exotic programming languages](/968984)

**Entities**

- [Java](/entity/java)
- [JavaScript](/entity/javascript)
- [Python](/entity/python)
- [C++](/entity/c++)

**Related coverage**

- [On “Trojan Source” Attacks](https://research.swtch.com/trojan) · research.swtch.com
- [Trojan Source: Invisible Vulnerabilities](https://www.lightbluetouchpaper.org/2021/11/01/trojan-source-invisible-vulnerabilities/) · Light Blue Touchpaper · Ross Anderson
- [View article](https://www.washingtonpost.com/politics/2021/11/02/cybersecurity-funding-is-stake-democrats-spending-battles/) · Washington Post
- [Pretty Much All Computer Code Can Be Hijacked by Newly Discovered ‘Trojan Source’ Exploit](https://gizmodo.com/pretty-much-all-computer-code-can-be-hijacked-by-newly-1847974191?scrolla=5eb6d68b7fedc32c19ef33b4) · Gizmodo · Lucas Ropek
- [Trojan Source attack method allows hiding flaws in source code](https://securityaffairs.co/wordpress/124081/hacking/trojan-source-attack.html) · Security Affairs · Pierluigi Paganini
- [Newly Discovered ‘Trojan Source’ Exploit Can Hijack All Computer Codes](https://fossbytes.com/newly-discovered-trojan-source-exploit-can-hijack-all-computer-codes/) · fossbytes.com · Nalin Rawat
- [‘Trojan Source’ technique can inject malware into source code without detection](https://siliconangle.com/2021/11/01/trojan-source-technique-can-inject-malware-source-code-without-detection/) · SiliconANGLE · Duncan Riley
- [‘Trojan Source’ attack method can hide bugs into open-source code](https://www.bleepingcomputer.com/news/security/trojan-source-attack-method-can-hide-bugs-into-open-source-code/) · BleepingComputer · Ionut Ilascu
- [New ‘Trojan Source’ Technique Lets Hackers Hide Vulnerabilities in Source Code](https://thehackernews.com/2021/11/new-trojan-source-technique-lets.html) · The Hacker News · Ravie Lakshmanan
- [This Unicode bug threatens the security of all source code](https://www.techradar.com/news/this-unicode-bug-threatens-the-security-of-all-source-code/) · TechRadar
- [View article](https://www.phoronix.com/scan.php?page=news_item&px=GCC-LLVM-Trojan-Source) · Phoronix
- [New ‘Trojan Source’ Method Lets Attackers Hide Vulns in Source Code](https://www.darkreading.com/threat-intelligence/new-trojan-source-method-lets-attackers-hide-vulns-in-source-code) · Dark Reading
- [‘Trojan Source’ Hides Invisible Bugs in Source Code](https://threatpost.com/trojan-source-invisible-bugs-source-code/175891/) · Threatpost · Lisa Vaas
- [Businesses and governments urged to take action over Trojan Source supply chain attacks](https://www.computerweekly.com/news/252508879/Businesses-and-governments-urged-to-take-action-over-Trojan-Source-supply-chain-attacks) · ComputerWeekly.com · Bill Goodwin
- [Trojan Source attack lets hackers exploit source code](https://www.hackread.com/trojan-source-attack-hackers-exploit-source-code/) · HackRead · Waqas
- [‘Trojan Source’ Attack Abuses Unicode to Inject Vulnerabilities Into Code](https://www.securityweek.com/trojan-source-attack-abuses-unicode-inject-vulnerabilities-code) · SecurityWeek · Eduard Kovacs
- [Programming languages: This sneaky trick could allow attackers to hide ‘invisible’ vulnerabilities in code](https://www.zdnet.com/article/this-sneaky-trick-could-allow-attackers-to-hide-invisible-vulnerabilities-in-code/) · ZDNet · Liam Tung
- [New Trojan Source attack impacts compilers for most programming languages](https://therecord.media/new-trojan-source-attack-impacts-compilers-for-most-programming-languages/) · The Record · Catalin Cimpanu
- [Security advisory for rustc (CVE-2021-42574)](https://blog.rust-lang.org/2021/11/01/cve-2021-42574.html) · Rust Blog
- [Overview  —  We present a new type of attack in which source code is maliciously encoded …](https://github.com/nickboucher/trojan-source) · GitHub · Nickboucher

**Discussion**

- Phoronix Phoronix x · GCC & LLVM Patches Pending To Fend Off Trojan Source Attacks
- @filosottile @filosottile x · 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…
- @briankrebs @briankrebs x · 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/ ..…

**Relationships**

- [Researchers](/search?q=%40%22Researchers%22) controversy [code compilers](/search?q=%40%22code+compilers%22), [Go](/search?q=%40%22Go%22), [C++](/entity/c++), [C#](/search?q=%40%22c%22), [JavaScript](/entity/javascript), [Java](/entity/java), [Rust](/entity/rust), [Python](/entity/python) · confirmed · Researchers disclose a Unicode security vulnerability affecting most code compilers, including compilers for Go, C++, C#, JavaScript, Java, Rust, and Python.

**Similar stories**

- [Report: malware developers are increasingly writing malicious code in “exotic” programming languages like Golang to hamper analysis efforts and evade detection](https://texxr.com/968984/malware-writers-adopt-golang-and-exotic-languages) · ZDNet, 28 July 2021 · [publisher](<https://www.zdnet.com/article/malware-developers-turn-to-exotic-programming-languages-to-thwart-researchers/>) · 54%
- [Multiple OSes including Windows, macOS, and Linux were affected by a serious security flaw caused by developers misinterpreting chipmakers' documentation](https://texxr.com/929436/major-os-vendors-patch-security-flaw-from-doc-misread) · ZDNet, 10 May 2018 · [publisher](<http://www.zdnet.com/article/microsoft-windows-apple-macos-linux-bsd-all-hit-by-same-serious-security-flaw/>) · 53%
- [Microsoft and others push out emergency patches for a critical flaw in Brotli, the C decoder library built into Node.js, that could allow remote code execution](https://texxr.com/1297857/microsoft-patches-critical-brotli-flaw) · BleepingComputer, 27 October 2026 · [publisher](<https://www.bleepingcomputer.com/news/security/critical-http2shell-brotli-vulnerability-triggers-emergency-patches/>) · 52%
- [A Python directory traversal vulnerability disclosed in August 2007, but never patched, likely affects 350K+ open-source projects and can lead to code execution](https://texxr.com/983098/old-python-directory-bug-threatens-350k-projects) · BleepingComputer, 22 September 2022 · [publisher](<https://www.bleepingcomputer.com/news/security/unpatched-15-year-old-python-bug-allows-code-execution-in-350k-projects/>) · 51%
- [XML flaws threaten ‘enormous’ array of apps](https://texxr.com/1271739/xml-flaws-threaten-applications) · The Register, 6 August 2009 · [publisher](<http://www.theregister.co.uk/2009/08/06/xml_flaws/>) · 51%
- [Google extends its Open Source Vulnerabilities database to include vulnerability databases from major open source projects, including Python, Rust, Go, and DWF](https://texxr.com/967826/google-expands-open-source-vuln-db-to-major-projects) · VentureBeat, 25 June 2021 · [publisher](<https://venturebeat.com/2021/06/24/google-extends-open-source-vulnerabilities-database-to-python-rust-go-and-dwf/>) · 50%
- [Chrome, Firefox, Brave, and Edge get updates to address an actively exploited flaw in the WebP Codec's library libwebp; many non-browser apps are also affected](https://texxr.com/844160/browsers-patch-active-webp-libwebp-codec-flaw) · Stack Diary, 14 September 2023 · [publisher](<https://stackdiary.com/critical-vulnerability-in-webp-codec-cve-2023-4863/>) · 50%
- [Claude flagged 493 security issues across 25 open-source projects, covering 5M+ lines of C, C++, Java, PHP, and Python code; one went unnoticed for 21 years](https://texxr.com/1297556/claude-finds-493-security-issues) · Anthropic, 22 October 2026 · [publisher](<https://www.anthropic.com/research/attack-surface-reduction>) · 49%
- [Anthropic says that during its testing, Opus 4.6 found 500+ previously unknown high-severity security flaws in open-source libraries with little to no prompting](https://texxr.com/1162896/anthropic-opus-4-6-finds-500-security-flaws) · Axios, 6 February 2026 · [publisher](<https://www.axios.com/2026/02/05/anthropic-claude-opus-46-software-hunting>) · 49%
- [20-year-old integer overflow vulnerability found, being patched in pervasive LZO compression algorithm](https://texxr.com/1204974/lzo-faces-20-year-old-overflow-vulnerability) · Dark Reading, 28 June 2014 · [publisher](<http://www.darkreading.com/decades-old-vulnerability-threatens-internet-of-things/d/d-id/1278903>) · 49%
- [Researchers: Intel CPUs vulnerable to new “LVI” attacks, which let attackers inject and execute code inside the CPU, theoretically even from a site's JavaScript](https://texxr.com/951450/researchers-find-intel-cpus-vulnerable-to-lvi-attacks) · ZDNet, 11 March 2020 · [publisher](<https://www.zdnet.com/article/intel-cpus-vulnerable-to-new-lvi-attacks/>) · 49%
- [Critical JavaScript vulnerability in Firefox 3.5](https://texxr.com/1271444/firefox-3-5-faces-javascript-vulnerability) · Mozilla Security Blog, 15 July 2009 · [publisher](<http://blog.mozilla.com/security/2009/07/14/critical-javascript-vulnerability-in-firefox-35/>) · 49%
- [Researchers detail newly patched RCE flaw in a widely used audio codec on Android devices with Qualcomm and MediaTek chips; Apple open sourced the codec in 2011](https://texxr.com/978197/research-patches-rce-in-android-audio-codec) · Ars Technica, 23 April 2022 · [publisher](<https://arstechnica.com/information-technology/2022/04/critical-bug-could-have-let-hackers-commandeer-millions-of-android-devices/>) · 49%
- [Vulnerability in GNU C library that has left apps and hardware open to attacks since 2008 is patched in new update](https://texxr.com/865068/glibc-vulnerability-patched-after-2008-exposure) · Ars Technica, 17 February 2016 · [publisher](<http://arstechnica.com/security/2016/02/extremely-severe-bug-leaves-dizzying-number-of-apps-and-devices-vulnerable/>) · 48%
- [Google says ~70% of all serious security bugs in Chrome, largely written in C/C++, are memory safety flaws, after analyzing 912 security bugs fixed since 2015](https://texxr.com/954010/google-finds-70-percent-chrome-bugs-are-memory-issues) · ZDNet, 25 May 2020 · [publisher](<https://www.zdnet.com/article/chrome-70-of-all-security-bugs-are-memory-safety-issues/>) · 48%
- [A Replit employee details a critical security flaw in web apps created using AI-powered app builder Lovable that exposes API keys and personal info of app users](https://texxr.com/886387/replit-reveals-lovable-app-builder-security-flaw) · Semafor, 1 June 2025 · [publisher](<https://www.semafor.com/article/05/29/2025/the-hottest-new-vibe-coding-startup-lovable-is-a-sitting-duck-for-hackers>) · 48%
- [OpenAI says the PHP flaws, found using GPT-5.6 Sol, “are among several significant vulnerabilities” it found and expects “similar findings to increase sharply”](https://texxr.com/1297525/openai-finds-php-flaws-using-gpt-5-6-sol) · OpenAI, 22 October 2026 · [publisher](<https://openai.com/index/coordinated-disclosure-of-critical-vulnerabilities/>) · 48%
- [PHP's creators disclose a critical memory-management vulnerability, dubbed “PHP2Shell”, that affects up to 70% of websites, discovered via GPT-5.6 Sol in August](https://texxr.com/1297520/php-discloses-php2shell-memory-vulnerability) · Wall Street Journal, 22 October 2026 · [publisher](<https://www.wsj.com/tech/cybersecurity/ai-just-found-a-bug-that-puts-up-to-70-of-the-worlds-websites-at-risk-fd0902ea?st=tBLRBh&reflink=desktopwebshare_permalink>) · 48%
- [Google says transitioning to memory-safe languages like Rust led to the share of memory-safe vulnerabilities in Android dropping from 76% in 2019 to 24% in 2024](https://texxr.com/876127/google-adopts-rust-cuts-memory-bugs) · The Hacker News, 26 September 2024 · [publisher](<https://thehackernews.com/2024/09/googles-shift-to-rust-programming-cuts.html>) · 47%
- [CERT-Bund discovers a serious vulnerability in VLC for Windows, Unix, and Linux that allows for remote code execution and hasn't been patched yet](https://texxr.com/944092/cert-bund-reports-vlc-remote-code-flaw) · ZDNet, 24 July 2019 · [publisher](<https://www.zdnet.com/article/remote-code-execution-vulnerability-in-vlc-remains-unpatched/>) · 47%

- **Judged:** Scribe wrote the corpus context.

## Sources

### The TEXXR article archive

*Section `articles`, as of 2 November 2021; judged by one reader, needs review*

The archive supplies the article and its links. Similar stories use the saved text vectors.

**Method**

- The archive holds the headline, publisher excerpt, coverage and discussion.
- Relationships use the article ID. Similar stories use the archive’s stored text vectors.

**Limits**

- Some articles have no Scribe context, recorded tags or relationships.
