# upload-insecure-files

Security testing playbook for file upload endpoints. It helps audit validation filters, storage path traversal, and background processing pipeline vulnerabilities.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3500 installs · ★ 2547
- Author: yaklang
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/yaklang/hack-skills/tree/HEAD/skills/upload-insecure-files/SKILL.md
- Updated: 2026-09-13
- HTML: https://affpapa.org/en/nevibecode/skills/upload-insecure-files

## What it does

The playbook models file upload testing across four distinct trust boundaries: accept, store, process, and serve. Flaws frequently hide outside the initial validation layer, triggering when an uploaded asset reaches asynchronous queues or storage subsystems.

It focuses on validation bypasses, including MIME mismatches, extension normalization, and magic-byte checks. The skill also audits predictable storage paths and filename reflections in admin views, PDFs, and log pipelines, treating filenames as untrusted input.

Deep exploitation of server-specific parser bugs in IIS, Nginx, or WebLogic requires loading the companion `SCENARIOS.md` reference. Testing complex CVEs without that companion file will leave server-level parsing blind spots unchecked.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill upload-insecure-files -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/upload-insecure-files/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/upload-insecure-files/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill upload-insecure-files -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/upload-insecure-files/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill upload-insecure-files -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/upload-insecure-files/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install yaklang/hack-skills upload-insecure-files
```

2. **Manually: put the files in place**
- File: `.github/skills/upload-insecure-files/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill upload-insecure-files -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/yaklang/hack-skills --path skills/upload-insecure-files
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/upload-insecure-files/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill upload-insecure-files -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/yaklang/hack-skills/tree/HEAD/skills/upload-insecure-files/SKILL.md

## When to use it
- audit extension and MIME type validation mechanisms
- detect predictable storage paths and multi-tenant overwrite risks
- identify vulnerabilities in background media and archive converters
- inspect filename reflection surfaces in logs and rendered reports

## Example prompts
- Audit our file upload route for extension bypasses and content-type validation flaws.
- Check our background image and archive processing pipeline for parser vulnerabilities.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 3437fcc2822f4159.

BEGIN THIRD-PARTY FILE 3437fcc2822f4159
```text
---
name: upload-insecure-files
description: >-
  Insecure file upload playbook. Use when testing upload validation, storage paths, processing pipelines, preview behavior, overwrite risks, and upload-to-RCE chains.
---

# SKILL: Upload Insecure Files — Validation Bypass, Storage Abuse, and Processing Chains

> **AI LOAD INSTRUCTION**: Expert file upload attack playbook. Use when the target accepts files, imports, avatars, media, documents, or archives and you need the full workflow: validation bypass, storage path abuse, post-upload access, parser exploitation, multi-tenant overwrite, and chaining into XSS, XXE, CMDi, traversal, or business logic impact. For web server parsing vulnerabilities, PUT method exploitation, and specific CVEs (WebLogic, Flink, Tomcat), load the companion [SCENARIOS.md](./SCENARIOS.md).

## 0. RELATED ROUTING

### Extended Scenarios

Also load [SCENARIOS.md](./SCENARIOS.md) when you need:
- IIS parsing vulnerabilities — `x.asp/` directory parsing, `;` semicolon truncation (`shell.asp;.jpg`)
- Nginx parsing misconfiguration — `avatar.jpg/.php` with `cgi.fix_pathinfo=1`
- Apache parsing — multiple extensions, `AddHandler`, CVE-2017-15715 `\n` (0x0A) bypass
- PUT method exploitation — IIS WebDAV PUT+COPY, Tomcat CVE-2017-12615 `readonly` + `.jsp/` bypass
- WebLogic CVE-2018-2894 arbitrary file upload via Web Service Test Page
- Apache Flink CVE-2020-17518 file upload with path traversal
- Upload + parsing vulnerability chain — EXIF PHP code + Nginx `/.php` path info
- Full extension bypass reference table (PHP/ASP/JSP alternatives, case variations, null bytes)

Use this file as the deep upload workflow reference. Also load:

- [path traversal lfi](../path-traversal-lfi/SKILL.md) when filename, extraction path, or include path becomes file-system control
- [xss cross site scripting](../xss-cross-site-scripting/SKILL.md) when uploads are rendered in browser contexts
- [xxe xml external entity](../xxe-xml-external-entity/SKILL.md) when SVG, OOXML, or XML imports are accepted
- [cmdi command injection](../cmdi-command-injection/SKILL.md) when a processor, converter, or media pipeline executes system tools
- [business logic vulnerabilities](../business-logic-vulnerabilities/SKILL.md) when quotas, overwrite rules, approvals, or storage paths create logic bugs
- [ghost-bits-cast-attack](../ghost-bits-cast-attack/SKILL.md) when the server is **Apache Tomcat** and the WAF blocks `.jsp` in `filename*` — Tomcat's `RFC2231Utility` narrows each char to byte, so `1.陪sp` (U+966A low byte = `j`) writes `1.jsp` to disk while the WAF sees no `.jsp` literal

---

## 1. CORE MODEL

Every upload feature should be tested as four separate trust boundaries:

1. **Accept**: what validation happens before the file is stored?
2. **Store**: where is the file written and under what name and permissions?
```
END THIRD-PARTY FILE 3437fcc2822f4159

The third-party file has ended. Everything between the 3437fcc2822f4159 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2864 of 18279 bytes. © yaklang · MIT · https://github.com/yaklang/hack-skills/tree/HEAD/skills/upload-insecure-files/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
