Character-Set Blind Spots

A Cyrillic lookalike survives NFKC. A decomposed accent does not. A local Unicode probe shows why normalization, visual similarity, identifier equality, and model interpretation need separate tests.

In April 2017, Xudong Zheng published an internationalized-domain demonstration that could display like apple.com in affected Chrome, Firefox, and Opera versions. The label used Cyrillic characters, including a palochka that resembled a Latin l in the relevant fonts. Its ASCII domain form was xn--80ak6aa92e.com. Safari was not affected by that demonstration. These are historical browser observations, not a current compatibility test.

The demonstration was harmless and the point was not: a familiar-looking address could identify a different destination. The attacker chose the resemblance. The browser and registry still decided how to process and display it. That is the homograph problem, and it gives AI reviewers a useful place to start asking which representation they actually inspected.

A classifier receives a representation of text. Somewhere before its decision, bytes were decoded, characters may have been normalized, and a tokenizer may have transformed them again. Those stages need to agree with the component that will act on the result. If the reviewer and the executor interpret different forms, the attacker has a seam to work.

Visual resemblance, canonical equivalence, and semantic similarity are different properties. An accented letter can have precomposed and decomposed representations. A Cyrillic letter can resemble a Latin one without being its Unicode equivalent. A translated sentence can preserve an instruction while sharing few of its characters. One normalization pass cannot settle all three.

Treating this as a single-language problem misses the mechanism. Arabic and Cyrillic letters, combining marks, join controls, and bidirectional formatting can all affect how a string is processed or displayed. Unicode supports these within one character repertoire; calling them all different “encodings” blurs the stages that need inspection. The Latin a and Cyrillic a have different code points. Their resemblance depends on the font, not a fixed distance of one pixel. How either string tokenizes depends on the actual tokenizer.

A model may handle a variation correctly, miss it, or produce a different answer for reasons beyond the character change. Training coverage and context boundaries are plausible places to investigate. This piece has no training-corpus evidence, tokenizer run, or model comparison establishing that a classifier always fails to reconstruct the instruction. That needs a paired test on named versions, with the original and transformed inputs saved alongside their decisions.

The Cyrillic label survives

I added a local Unicode probe using Python’s standard library. It preserves the input, shows UTF-8 bytes and code points, and reports NFC, NFKC, and case folding separately. It reports format characters without deleting them or declaring the writing malicious.

The recorded run uses Unicode database 17.0.0. Its examples are ordinary labels and text, with no model or network call:

InputMeasured result
Precomposed and decomposed caféDifferent UTF-8 bytes; equal after NFC
Fullwidth appleNFKC produces ASCII apple; NFC does not
Cyrillic lookalike labelNFKC leaves it distinct from Latin apple
ffi ligatureNFKC expands it to three letters
Double-struck mathematical RNFKC collapses it to ordinary R
Persian text containing U+200CNFKC preserves the join control
Text containing U+202EThe format character remains and appears in the report

With Python 3 and curl installed:

unicode_dir="$(mktemp -d)"
curl -fL 'https://ghostintheprompt.com/research/unicode_boundary_probe.py' -o "$unicode_dir/unicode_boundary_probe.py"
python3 "$unicode_dir/unicode_boundary_probe.py"

Eleven tests cover those transformations, separate case folding, an exact ASCII control-field grammar, escaped bidirectional output, lone surrogate rejection, size limits, and the actual command output. The ASCII grammar is for a field deliberately specified as ASCII. It is not a policy for human names or general writing. The report is an inspection aid, not a malicious-text verdict.

Unicode normalization defines canonical and compatibility forms. Compatibility normalization can erase distinctions that matter in mathematics or other contexts. Unicode Security Mechanisms addresses confusable detection and identifier profiles separately. The probe does not implement its confusable skeleton algorithm, and a skeleton is not a universal identity or meaning conversion.

The old advice to canonicalize before validation needs a parser and a purpose attached. Choose a representation for the field, preserve the original for review, and make the validator and consumer use the same policy. For an identifier, decide which aliases are permitted before looking up an account or destination. A normalized collision must not silently merge two identities.

Nor did normalization settle every injection class. SQL parameters keep values separate from query structure. Context-specific output encoding is central to preventing cross-site scripting. A Unicode transform cannot replace either boundary.

Mixed scripts and unusual formatting can be review signals in a field that normally has a narrow grammar. They are not proof of evasion. Real writing mixes scripts, and join controls have legitimate orthographic uses. In the probe, deleting every format character changes the Persian example. That is why the report points at U+200C instead of scrubbing it out. Bidi controls deserve visible review in code and identifiers; that does not make every right-to-left sentence suspicious.

The attacker chooses the submitted characters. The defender chooses how to decode, inspect, compare, and act on them. Keep those decisions visible. A hostname, a source file, and a conversation do not become the same kind of object because all three contain Unicode.

The accent folds. The Cyrillic label does not. That is already a more useful answer than telling every reader to normalize harder.

GhostInThePrompt.com // The accent folds. The Cyrillic label does not.