Bug class · Intermediate
Unrestricted file upload
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.
- median public bounty
- $1,337
- highest public bounty
- $5,600
How it works
Full lessonThe pattern behind every report in this class.
Unrestricted file upload is a flaw where an application accepts a file of a type or content it should reject, then stores it somewhere it can be retrieved or executed. The reports behind this lesson show it across open source web applications, Department of Defense sites, enterprise file transfer appliances, marketing SaaS tools, partner portals, issue trackers and cloud storage backed uploads. Programs care because the same missing check can turn a harmless looking form into stored script execution in another user's browser, server side code execution, or overwriting of files that belong to other people.
What it usually leads to depends on where the file lands. When uploads are served from the same origin with a content type that allows active content, the result is stored cross site scripting, as seen in issue trackers, helpdesk forms and signature settings. When the upload directory executes server side scripts, the result is code execution, as seen in backup, workflow and document server products. When files are stored in shared cloud buckets under predictable keys, the result can be replacement of another user's attachment. Some reports stop at acceptance of a dangerous type, which is weaker but still worth understanding.
It turns up most often wherever users are invited to attach something: profile pictures, avatars, logos, signatures, chat windows, bug report forms, CV and resume uploads, theme assets and snippet features. It also appears in less obvious places such as remote avatar URL options, direct upload routes for cloud storage, web server PUT handling and appliance admin interfaces. The common thread is a feature that takes a file from a user and does not fully decide what that file is allowed to be or where it is allowed to be served from.
Conceptually the flow is simple. A user picks a file, the browser sends it to an endpoint, the server decides whether to keep it, and later the file is served back or processed. The vulnerability appears when one of those steps is missing or too trusting. Many reports show the server checking only the declared content type and not the real content or extension, so an executable class file was stored and served. Others show the check looking only at the filename extension while the file was still served as active content.
Things to try
All 59Each line worked in a disclosed report. Test only what a program's scope allows.
Upload endpoints and authentication 11
- Use IIS tilde enumeration to find upload handlers, then fuzz for an image upload handler and upload a script type.
- Upload an attachment with the same filename as another user's attachment and check whether it overwrites the earlier file.
- Upload a dangerous file type through an attachment feature and check whether it is accepted and served.
- Upload a dangerous file type through a CV or resume upload and check whether it is accepted.
Client-side download and file handling 9
- Check whether a browser or desktop app lets a file be uploaded without meaningful user interaction or confirmation.
- Run curl with the flags that honour the server-supplied filename and have the server name an existing local file, then check whether it is overwritten.
- Send a link in a desktop messenger's spam section and check whether it opens in an in-app window that can load local files.
- Send an email whose attachment name contains a quote and a benign extension, then download it and check the saved extension.
Profile, avatar and media features 8
- Embed code in an image with a metadata tool, rename it to a script extension and upload it through a profile picture feature, then work out the stored path from the response.
- Upload an executable through a contact image dialog and see whether any data type is accepted.
- On a mobile site's image upload handler, send a file of a different type and check whether it is stored and executed.
- Upload a non-image file through an image field and check whether unrestricted types are accepted.
SVG, XML and metadata payloads 6
- Upload an SVG as a logo and check whether script in it executes in other users' browsers.
- Add an AsciiDoc block macro that references a local file path in a wiki page, then decode the rendered image to read the file.
- Use the counter function in an AsciiDoc document to set locked attributes such as URI reading and diagram fetch, then read local files or write to arbitrary paths.
- Upload an SVG containing an external entity and check whether the parser resolves it.
Filename and extension manipulation 5
- Send a save-image request with filename and extension parameters and test whether directory traversal in the filename writes outside the intended directory.
- Change the extension parameter on an image save endpoint to a server-side script type and check whether the file is created and reachable.
- Pass a variant parameter hash that includes a write-to-file operation and check whether image data is written to an arbitrary server path.
- Upload a filename containing a right-to-left override character and check how the UI displays it and whether an executable type is accepted.
Bypasses and variations
- Bypass a client-side-only file type check by sending the upload request directly rather than through the page's script.
- Insert a null byte between two extensions so the validator sees a safe extension while the server saves and executes the dangerous one.
- Add a trailing space after a script extension in the uploaded filename to defeat the extension check.
- Bypass a drag-and-drop file type check by using the browse button to select a disallowed document type.
- Prepend an image magic string to a script file to defeat content validation, then combine it with a filename trick.
Tips for beginners
All 14- Start with the features that already take files: profile pictures, avatars, logos, signatures, chat attachments, bug report forms, CV and resume uploads, theme assets and snippet features. These are the places the evidence shows repeatedly. Read the page's JavaScript to find the real submit endpoint and the uploads directory rather than guessing.
- Check whether the type check is only in the browser. If the page filters by extension or drag and drop, send the request directly and see whether the server still accepts it. A client side only check is one of the most common findings in this set.
- Look at how the file is served back, not just whether it is accepted. Upload a file that the server serves with a content type allowing script execution and check whether it runs in another user's browser. Acceptance alone is weak; execution or a clear path to it is what shows impact.
- Try the filename and extension parameters, not only the file body. Send a save image request with filename and extension parameters and test whether traversal writes outside the intended directory, or whether changing the extension to a server side script type creates a reachable file.
- Test the remote URL option on avatar and image features. The remote avatar URL path skipped the file type checks that the direct upload path applied, so point the URL parameter at a non image file and see whether any type is accepted.
- Check unauthenticated endpoints and public reachability. Find an upload endpoint that needs no authentication and check whether uploaded files are publicly reachable. Enumerate directories to find an upload folder that returns success without authentication.
Start here: a reading path
Open the pathClear reports in order, easiest first.
-
1
From a Payment Receipt Upload to Full Server Compromise: An Arbitrary File Upload Case StudyBeginner
The upload endpoint lacked file-type validation, stored files inside the web root, and left script execution enabled in the upload directory.
-
2
Arbitrary File Upload via “External Files” feature allows cliBeginner
The server trusted client-side validation and did not independently verify file extension, MIME type, or content.
-
3
Persistent PHP Payloads In PNGs: How To Inject PHP Code In An Image – And Keep It There !Beginner
A PHP application allowed users to upload PNG images that were stored with the original filename, so an attacker could name the file with a .php extension and embed PHP code in the image. When the file was requested, the server executed the PHP code, leading to remote code execution.
-
4
100$ Bug — The Hidden Cost of “Unsigned” Uploads: ExploBeginner
The application used an unsigned upload preset, so the third-party storage service accepted files without any backend authentication or authorisation check.
-
5
CVE-2026–38526 Deep Dive: Unrestricted PHP Upload RCE in Krayin CRMBeginner
The upload handler trusted the client-supplied filename and content type, applied no extension or content validation, and stored files in a web-accessible directory where PHP is executed.
-
6
Wrong Variable Name Leads To RCE | CVE-2025–52130Beginner
The validation rules referenced parameter names that did not match the actual form field names, so the mime-type checks were never applied to the uploaded files.
-
7
Product: eGain Chat (Version 15.0.3)Beginner
Likely the application relied solely on client-side validation for file uploads, with no server-side checks on file type or content.
-
8
CVE-2025–7847 — Arbitrary File Upload in AI Engine WordPBeginner
The plugin's file upload endpoint lacked file-type validation and relied on a permission check that returned true for any logged-in user when the Public API was enabled.
Guides and techniques
View allThe best explainers, cheat sheets and technique posts on File upload, from around the web.
-
The minefield between syntaxes: exploiting syntax confusions in the wildShows how differing parser and syntax interpretations across languages can be abused to bypass filters and craft working payloads.
Technique yeswehack.com
-
20 Real-World File Upload Bypass Tricks Beyond php.jpg: Step-by-Step Guide for PentestersCollects twenty practical file upload bypass tricks with step by step instructions for testers.
Cheat sheet medium.com
-
Uploading web.config for Fun and Profit 2Shows how uploading a web.config on IIS can yield command execution and stored XSS in root or subfolders.
Technique soroush.me
-
SVG, Double Extensions, and Magic Bytes: Beating Upload FiltersCovers bypassing upload validation using SVG files, double extensions and magic byte manipulation.
Technique kd-200.medium.com
-
Insecure file uploads: A complete guide to finding advanced file upload vulnerabilitiesDetails how to find and exploit file upload flaws, including bypassing extension blacklists and whitelists, content type checks and magic bytes.
Methodology intigriti.com
Highest paid
View allThe biggest public bounties for File upload.
-
$5,600 -
Recon HarderStarbucks Write-up
$5,600 -
The Accidental RCEWrite-up
$4,800 -
$3,000 -
Insufficient validation of untrusted input in Downloads (CVE-2026-0903)Medium Google Chrome Advisory
$3,000 -
$3,000 -
Inappropriate implementation in Filesystems (CVE-2025-8580)Low Google Chrome Advisory
$2,000 -
Lack of meaningful user interaction requirement before file upload (CVE-2018-6095)Medium Google Chrome Advisory
$2,000
Newest reports
All 504Most recently disclosed.
-
-
-
-
-
-
-
CVE-2026-111951: curl -OJ truncate without filenameLow curl HackerOne
-
-
-
CVE-2026-92390: -J no-clobber guarantee bypassed with 103 early hintsInformational curl HackerOne
New File upload reports by email
Follow File upload and get each week's new disclosures in one short email.