Glossary
Glossary, CVEs, and references
Definitions, Common Weakness Enumerations, and historic incidents.
This reference index defines core technical concepts and records historic file upload vulnerabilities.
Technical glossary
Section titled “Technical glossary”Magic bytes
Section titled “Magic bytes”Magic bytes are constant numerical or string signatures located at the beginning of a file. Operating systems and validators inspect these initial bytes to identify file formats.
Polyglot file
Section titled “Polyglot file”A polyglot is a file crafted to be valid under two or more distinct file format specifications. An example is a file that starts with a GIF header while containing executable PHP instructions.
Zip Slip
Section titled “Zip Slip”Zip Slip is an arbitrary file write vulnerability that occurs during archive extraction. Archive entries containing directory traversal characters overwrite files outside the target extraction folder.
Phar deserialization
Section titled “Phar deserialization”Phar is a PHP archive format that stores serialized object metadata. When PHP filesystem functions access a phar file via the stream wrapper, PHP deserializes the metadata automatically.
MIME sniffing
Section titled “MIME sniffing”MIME sniffing is a browser behavior where the client examines response bytes rather than trusting the declared content type. Without protective headers, browsers may execute HTML tags disguised as plain text.
Formula injection
Section titled “Formula injection”Formula injection occurs when spreadsheet export routines output unsanitized user input beginning with formula operators. Spreadsheet software evaluates these formulas when a user opens the exported document.
Common Weakness Enumeration mappings
Section titled “Common Weakness Enumeration mappings”| CWE identifier | Formal title | Upload relevance |
|---|---|---|
| CWE-434 | Unrestricted Upload of File with Dangerous Type | Core file upload vulnerability class |
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory | Directory traversal and Zip Slip archive extraction |
| CWE-79 | Improper Neutralization of Input During Web Page Generation | Stored cross-site scripting via SVG and HTML uploads |
| CWE-611 | Improper Restriction of XML External Entity Reference | External entity injection in SVG and Office documents |
| CWE-1236 | Improper Neutralization of Formula Elements in a CSV File | Spreadsheet formula injection in data exports |
| CWE-502 | Deserialization of Untrusted Data | Object injection via PHP phar stream wrappers |
Disclosed cases and historic incidents
Section titled “Disclosed cases and historic incidents”ImageTragick in ImageMagick
Section titled “ImageTragick in ImageMagick”CVE-2016-3714 permitted remote code execution in ImageMagick through unsanitized delegate commands. Attackers uploaded crafted images with URL delegate parameters to execute operating system commands.
ExifTool DjVu parsing flaw
Section titled “ExifTool DjVu parsing flaw”CVE-2021-22204 allowed command execution through crafted DjVu metadata inside JPEG images. This flaw enabled unauthenticated code execution in GitLab instances under CVE-2021-22205.
Instagram profile photo deserialization
Section titled “Instagram profile photo deserialization”In 2019, a security researcher demonstrated remote code execution on Instagram through user profile photo uploads. The attack chained a polyglot image with PHP phar stream wrapper deserialization.
Snyk Zip Slip research
Section titled “Snyk Zip Slip research”In 2018, Snyk documented widespread path traversal vulnerabilities across archive extraction libraries in Java, Python, Go, and JavaScript. The research showed that default extraction code frequently wrote files outside intended destination directories.
References and official sources
Section titled “References and official sources”- OWASP File Upload Cheat Sheet: Practical guidelines for engineering defense against file upload vulnerabilities.
- PortSwigger Web Security Academy: Instructional labs covering file upload bypass techniques and server configurations.
- FIRST CVSS v4.0 specification: Industry scoring standard for evaluating vulnerability severity.
Return to the checklist or the decision tree to apply any station you have not yet tested.
Open local graph around this page
Linked from here
Links out to
No outgoing internal links on this page.
File UploadFor authorized testing only.