Polyglot File¶
A single file supports valid interpretations under two or more file formats.
Core Idea¶
A polyglot file is one file that is valid under two or more file formats. The same bytes can therefore be processed under different format rules, potentially producing different content or behavior depending on the reader. A researcher defining the term in a particular setting should state what counts as validity: formal conformance to a specification and acceptance by a named implementation are related but distinct claims. An implementation may accept extensions or malformed material that another rejects.[1]
A construction can exploit format features such as tolerated additional data or extensible structures, but there is no single required layout. The Mitra project describes several layout strategies and gives a PNG/DICOM example. Its separate category of near-polyglots is a reminder not to assume every composite file is fully valid in every advertised format.[2]
How would you explain it like I'm…
The Two-Language File
One File, Many Formats
Multi-Format Valid File
Structural Signature¶
- One byte sequence: the same stored file is examined in each case.
- Two or more interpretations: distinct format conventions or implementation behaviors govern parsing.
- Validity evidence: specification analysis supports conformance; tests of named reader versions establish observed acceptance. The two kinds of evidence are not interchangeable.
- Layout: the arrangement satisfies the applicable requirements in the tested setting; extra data, containers, offsets or other format-specific features may make this possible.
- Interpretive result: the content or behavior obtained under each interpretation can differ, though difference in visual appearance is not itself a validity test.
What It Is Not¶
A renamed extension or a file containing an ordinary embedded object is not automatically a polyglot: the relevant question is whether the same complete file meets the stated validity criterion for each format. Two readers disagreeing about malformed bytes is evidence of a parser discrepancy, but does not by itself prove specification conformance to two formats.
A polyglot need not be malicious, executable, intended to deceive, or accepted identically by all versions of a parser. A security-sensitive file can nevertheless exploit an identification gap when one component recognizes one format while a later component processes another.[1]
Scope of Application¶
Polyglot files arise in format research, compatibility experiments and security analysis. Mitra's example combines PNG and DICOM representations; its listed construction methods include stacking and placing one format within permitted structures of another. The ORNL study analyzes a collection of malicious uses and detection methods; it does not establish that all polyglots are malicious or that one detector works universally.[2][1]
Clarity¶
Name the whole file, both formats, the intended validity criterion and the readers or specifications used to check it. Separate claims about what the bytes represent from claims about how a particular operating system routes or executes them. Record version and conformance assumptions where they matter.
Manages Complexity¶
One byte sequence can be built or interpreted under multiple conventions without making those conventions identical. This can be useful for testing format interactions; it also complicates pipelines that select analysis solely from a single detected type. Verification must examine each relevant interpretation rather than rely only on an extension or first signature.[1]
Abstract Reasoning¶
Choose the interpretations to be supported; identify their relevant syntactic and semantic constraints; arrange compatible data; and test the whole result under the stated specifications or implementations. Check each result separately and distinguish a genuine two-format file from a merely embedded or near-polyglot object.
Example¶
The Mitra project documents a construction from PNG and DICOM inputs that it describes as a working PNG/DICOM polyglot. The example is a claim about that construction; actual acceptance should be tested with the intended readers and versions.[2]
Neighborhood in Abstraction Space¶
Polyglot File sits in a sparse region of the domain-specific corpus (92nd percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.
Family — Unclustered & Miscellaneous (3155 abstractions)
Nearest neighbors
- YARA — 0.80
- Data Format — 0.79
- Sequential access — 0.77
- Transclusion — 0.77
- File Format — 0.77
Computed from structural-signature embeddings · 2026-11-14
Not to Be Confused With¶
A file format is a convention for organizing and interpreting files; a polyglot file is an instance with multiple interpretations. Parser differential means implementations disagree on some input and may occur without a file conforming to two distinct formats. Historical dual-format floppy media concern a physical disk layout for different systems; they require their own evidence and are not established by modern file examples.
Historical Companion: Dual-Format Floppy Media¶
A dual-format floppy disk can be designed to carry material usable by different computer systems on one physical medium. In its August 1988 issue, ST Amiga Format described its cover disk as readable by both the Atari ST and Commodore Amiga and supplied separate instructions for their users. That is a claim about the magazine's disk and those systems, not a claim that every such disk uses the same physical layout.[3]
The Library of Congress later described a preservation example in which KryoFlux can produce Amiga and Atari ST sector-image outputs from a dual-format disk. That observation concerns imaging and interpretation of the medium; it does not by itself establish how the historical disk boots or how a particular track is arranged.[4]
This historical media example is related to, but distinct from, a polyglot file. A physical disk can contain different regions or system-specific structures; its usability on two machines does not establish that one complete file conforms to two file formats. The disk need not instantiate this entry's single-file signature.[3][4]
References¶
[1] Luke Koch and colleagues, “Where the Polyglots Are: How Polyglot Files Enable Cyber Attack Chains and Methods for Detection & Disarmament,” 2024, research manuscript. registry ↩a ↩b ↩c ↩d
[2] Corkami, “Mitra,” binary polyglot generator and project documentation. registry ↩a ↩b ↩c
[3] ST Amiga Format Issue 2 (August 1988), pp. 64–65, 70, cover-disk contents and instructions. registry ↩a ↩b
[4] Library of Congress, “KryoFlux Stream File”, Notes, Sustainability of Digital Formats, last significant update January 18, 2024. registry ↩a ↩b