exploiting-file-upload-vulnerabilities

Tests file upload endpoints for extension bypasses, polyglot payloads, and path traversal to confirm remote code execution.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill exploiting-file-upload-vulnerabilities
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exploiting-file-upload-vulnerabilities
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/web-application-security/exploiting-file-upload-vulnerabilities
Command: npx skills add https://github.com/xalgord/xalgorix --skill exploiting-file-upload-vulnerabilities

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Applications that accept file uploads often rely on weak validation such as extension blocklists or spoofable Content-Type headers, leaving them exposed to webshell execution, stored XSS, and path traversal. This Skill provides a structured methodology to identify, bypass, and confirm these weaknesses during authorized penetration tests.

Core Features & Use Cases

  • Extension and Content-Type Bypass Matrix: Covers double extensions, case toggling, null bytes, trailing characters, MIME spoofing, and magic-byte polyglots for PHP, ASP, and JSP targets.
  • Image Library and Archive Exploitation: Includes ImageTragick (CVE-2016-3714), Ghostscript, SVG-based XSS/XXE/SSRF, and Zip Slip traversal payloads.
  • Verification Workflow: Locates uploaded files, checks served Content-Type, and confirms code execution to produce evidence-backed findings with CVSS-scored report output.
  • Use Case: During an authorized assessment of a profile avatar feature, upload a GIF89a-prefixed PHP polyglot with a .php.jpg double extension, retrieve the returned upload URL, and confirm command execution to demonstrate RCE.

Quick Start

Test the avatar upload endpoint at the target application for extension filter bypasses using a polyglot PHP/JPEG file and confirm whether the uploaded shell executes.

Frequently Asked Questions about exploiting-file-upload-vulnerabilities

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bypass file upload extension filters?

Extension filter bypasses include double extensions like shell.php.jpg, case toggling such as .pHp, alternative PHP extensions like .phtml or .phar, null byte injection, and trailing dots or spaces that Windows strips on save. Test each variant and observe which the server accepts and executes.

How to bypass Content-Type validation on file uploads?

Content-Type validation is bypassed by declaring an image MIME type such as image/jpeg while sending executable content, since the header is client-controlled. Combine this with magic-byte prefixing, for example GIF89a or JPEG FFD8FF bytes before PHP code, to also pass server-side content sniffing.

What is a polyglot file in upload exploitation?

A polyglot file is valid in multiple formats simultaneously, such as a JPEG that is also executable PHP. It passes magic-byte validation as an image while the server-side handler still parses and executes the embedded code.

Can SVG uploads lead to XSS or SSRF?

Yes, SVG files can carry stored XSS via onload handlers that execute in viewers' browsers, and XXE entities that read local files or trigger SSRF. Applications serving uploaded SVGs without sanitization or Content-Disposition: attachment are exposed.

Why does my uploaded webshell not execute?

Webshells fail to execute when uploads are stored outside the web root, served with Content-Disposition: attachment, renamed to non-executable extensions, or when the server lacks a handler mapping for that extension. Check the served Content-Type and try .htaccess or web.config uploads to enable execution.

When should file upload testing not be performed?

Upload testing requires written authorization explicitly covering upload functionality in the penetration testing agreement. It should not be performed on production systems without scope approval, since webshells and traversal payloads can alter server state.