All specs
IANAMust KnowProduct

File Signatures (Magic Bytes)

Data FormatsยทInternet Assigned Numbers Authority
WHY YOU NEED THIS

Extension spoofing (`virus.exe` โ†’ `photo.jpg`) and MIME spoofing are common attack vectors. Magic-byte detection is the first line of defense in upload validation, antivirus, and content sniffing.

What It Defines

Recognizable byte sequences at the start (or end, for formats like ZIP) of a file that identify its true format independent of filename or declared MIME type. Examples: PNG `89 50 4E 47`, PDF `%PDF`, ZIP `PK\x03\x04`, JPEG `FF D8 FF`. Secure systems sniff magic bytes and parse structure โ€” they do not trust extensions or Content-Type alone.

Related References

magic-bytesfile-signaturesniffingsecurityvalidation
Standards Body
Internet Assigned Numbers Authority

Authoritative registry for protocol parameters: ports, HTTP status codes, media types, DNS record types, and many other code points. Not a spec body โ€” a registry body.

Visit

Related Specs

IANAMust Know

File Formats

Every upload, download, attachment, and asset pipeline crosses these layers. Misunderstanding header vs envelope causes MIME spoofing bugs, parser differentials, and broken file validation. Start here before diving into individual format specs.

ProductData Formats
Details
IANA Media TypesIANAMust Know

Media Types

Correct Content-Type headers drive content negotiation, browser rendering, and API behavior. Wrong types cause security and parsing bugs.

ProductData Formats
Details
W3C PNG / ISO/IEC 15948W3CMust Know

PNG

PNG is the default lossless image format on the web โ€” screenshots, UI assets, icons with transparency, and OCR-friendly graphics. Chunk structure matters for metadata stripping and security review.

ProductData Formats
Details
ISO/IEC 10918 / ITU-T T.81ISO/IECMust Know

JPEG

JPEG dominates photo storage and delivery. EXIF metadata (GPS, camera, orientation) lives in APP1 markers โ€” relevant for privacy, image processing, and upload pipelines.

ProductData Formats
Details
ISO 32000ISO/IECMust Know

PDF

PDF is the standard for invoices, reports, contracts, and printable documents. Object/stream structure, encryption, and embedded content matter for parsing, redaction, and security review.

ProductBack OfficeData Formats
Details
APPNOTE / ISO/IEC 21320ISO/IECMust Know

ZIP

ZIP is everywhere โ€” downloads, backups, Java JARs, Office Open XML. Central-directory-at-end structure, path traversal (`../../`), and zip bombs are critical security concerns.

ProductData Formats
Details