Unicode Tricks Let Malicious Python Code Bypass Code Review
A subtle but powerful class of attacks allows source code to pass human review while executing completely different logic. The root cause lies in the gap between how fonts render Unicode characters and how the Python interpreter reads the underlying bytes.
The first technique uses homoglyphs. An attacker can declare is_admin = False followed by a second assignment that looks identical but actually uses the Ukrainian letter і (U+0456) instead of Latin i (U+0069). The review sees a single variable being set to True, yet the interpreter creates two separate identifiers. The same substitution works for function names such as validate_token, causing the wrong implementation to run in production.
Python normalizes identifiers with NFKC, which collapses some visually similar characters but leaves Cyrillic letters untouched. Consequently, the attack remains effective in real codebases.
The second technique relies on bidirectional override characters (RIGHT-TO-LEFT OVERRIDE U+202E and related controls). These characters are required for Arabic and Hebrew text, yet they also allow an attacker to reorder source lines visually. A comment that appears harmless on screen can actually contain executable statements once the compiler ignores the display order. The technique became widely known in 2021 as the Trojan Source attack and affects nearly every mainstream programming language.
The third, simpler method inserts zero-width characters (U+200B, U+2060, etc.) inside string literals. The string 'password' has length nine and will never equal the expected value, yet the difference is invisible to the naked eye and defeats both manual inspection and simple grep searches.
A compact detection script walks the source with Python’s tokenize module and separately scans for bidirectional and zero-width characters. Checking only identifier tokens prevents false positives from comments and string data. The same logic is available as built-in rules in ruff and flake8, while gitleaks can block commits containing the dangerous characters.
Teams are advised to run the check across existing repositories, integrate it into CI pipelines, and treat any intentional insertion of these characters as a serious red flag during incident review.
Related articles
Uber Breach Exposes 149,000 Drivers After Third-Party Vendor Credentials Stolen
Uber has notified approximately 149,346 drivers that personal data was stolen in an October incident involving a compromised third-party vendor. Attackers used valid credentials belonging to the vendor to access data the ride-hailing company had shared with it, bypassing all security alerts because the access appeared legitimate. The affected information includes driver license images, names, addresses, dates of birth and government-issued identification numbers. The vendor was later identified as Fireworks AI, a cloud platform for running and fine-tuning open-source AI models. The same credential theft campaign had previously impacted Notion and Cursor. Uber immediately severed the connection upon discovery, notified regulators in multiple U.S. states, and is offering credit monitoring to affected individuals.
FBI Warns of ARTEX AI Pentest Framework Abused by Cybercriminals with Backdoored Docker Images
The FBI has issued an alert regarding the open-source ARTEX AI-powered penetration testing framework after it was observed in criminal operations targeting banks, governments, and technology companies since August 2026. Attackers achieved privileged access in under three hours in multiple incidents. The Cloud Security Alliance identified compromised Docker images containing a backdoor that executes root commands without authentication by exploiting a hidden CAPTCHA field value passed to sh -c. Approximately 9,000 downloads occurred from one malicious image, and 62 exposed consoles were found running the tampered version. Check Point reported 1,608 internet-exposed ARTEX consoles, including ten with exposed databases. The original GitHub repository was removed in October 2026, yet third-party copies and images continue to circulate. CERT-EU highlighted the lack of technical restrictions preventing out-of-scope actions by autonomous AI agents.
Optimizely Supply Chain Attack Infects BBC, CNN, HSBC and 177 Other Sites with Crypto-Stealing JavaScript
On November 16, visitors to major corporate websites received malicious JavaScript that swapped cryptocurrency wallet addresses and attempted to intercept banking card data. The code was distributed through Optimizely Web, a platform used for A/B testing. Researchers identified the malicious code in 188 scripts belonging to 178 organizations, including BBC, CNN, Fox News, HSBC, Equifax, Zoom, Salesforce, GitLab and IKEA. Attacker Scott Helm from Report URI reconstructed the attack timeline: adversaries modified the Project JavaScript field in client projects to load a file from an external domain while legitimate code continued to arrive from cdn.optimizely.com. The campaign began at 04:21 UTC on the BBC script and saw 26 payload updates throughout the day, including a card-data harvesting module added at 13:43 UTC. The malicious script could not access Stripe or Adyen payment forms inside iframes but attempted iOS exploit chains Coruna and DarkSword on affected devices. Optimizely confirmed the breach resulted from a vulnerability in Experimentation account registration, closed the flaw, removed the code and notified customers. Content Security Policy blocked the payload on only 24 of 256 tested sites, and attackers collected roughly $7,040 in cryptocurrency before cleanup completed around 21:52 UTC.
Rspamd 4.3.0 Released with Improved Phishing Detection, Attachment Scanning and Authentication Hardening
In mid-November 2026, developer Vsevolod Stakhov released Rspamd 4.3.0, the latest version of the open-source spam filtering system written in C, C++ and Lua under the Apache 2.0 license. The update strengthens HTTP connection handling, URL-based phishing checks, SPF/DKIM/ARC authentication validation and SMTPUTF8 address parsing while adding more robust attachment and HTML analysis. Key improvements include separate scoring for displayed versus actual link destinations, stricter rejection of weak DKIM keys and duplicate tags, and better archive filename handling to prevent executable hiding. The release also introduces the HTML_TINY_PIXEL_TRACKER rule to detect tracking beacons and fixes multiple bugs that could cause worker crashes or memory issues after free. Several changes may require configuration adjustments for existing users, particularly around symbol options and stricter authentication policies. Rspamd continues to support high-throughput Milter integration with Postfix and Sendmail while offering an extensive Lua API for custom processing logic.