Skip to content

Glossary

Glossary, CVEs, and references

Definitions, Common Weakness Enumerations, and historic incidents.

2 min readFile Upload

This reference index defines core technical concepts and records historic file upload vulnerabilities.

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.

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 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 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 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 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.

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

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.

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.

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.

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.

Return to the checklist or the decision tree to apply any station you have not yet tested.

Connections2 backlinks · 0 outgoing · 2 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Links out to

No outgoing internal links on this page.

File UploadFor authorized testing only.