file-upload
Skill20 starsChanged 4 months agoMITView on GitHub
Detects file upload handlers that accept executable content or write to web-
15 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- SubhiSec/claude-ai-cyber-security-skillstheir own version, first seen Oct 25, 2026
- Dhruv2mars/skillstheir own version, first seen Oct 20, 2026
- FlyelepAI/agent-skillstheir own version, first seen Oct 17, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 16, 2026
- TaiMaBenJi/taima-skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use sqli, xss and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SubhiSecSkillsqli
Hunt SQL injection in REST/GraphQL/SOAP/raw parameters using sqlmap, ghauri, manual UNION/Time/Boolean techniques, and custom WAF-bypass tamper scripts. Use when an input flows into a database query or when the user has identified a parameter that might be vulnerable.
Also in 6 projects that use this
SubhiSecSkillxss
Hunt reflected, stored, and DOM-based Cross-Site Scripting (XSS) including CSP bypass, polyglot payloads, mutation XSS (mXSS), markdown XSS, and template XSS. Use when the user has identified a parameter or input that reflects to the page, or wants to test for XSS in a specific input.
Also in 7 projects that use this
zebbernSkilljs-analysis
Analyze JavaScript files to discover hidden endpoints, API keys, secrets, and sensitive data. Use when testing web applications, when user mentions JavaScript analysis, or when looking for hidden API endpoints.
Also in 3 projects that use this
blacklanternsecuritySkilljwt-attacks
Exploit JWT (JSON Web Token) vulnerabilities during authorized penetration testing.
Also in 3 projects that use this
- +3 more from SubhiSec
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- cdxiaodong/cain-agent★ 953same name
- Rain-kl/OpenFlare★ 298same name
- SubhiSec/claude-ai-cyber-security-skills★ 45same name
- 0xGhostCAT/claude-ai-cyber-security-skills★ 41same name
- fusebase-dev/fusebase-flow★ 9same name
- FlyelepAI/agent-skills★ 4same name
- iAskShahram/skills★ 4same name
- langbyyi/websec-skills★ 4same name
- Dhruv2mars/skills★ 3same name
- 1398281322-a11y/java-backend-guardrails★ 2same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- graphql-securitySkill
- hardcoded-secretsSkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
No extension allowlist, or an extension denylist that misses novel or case-varied extensions
- Distinctive: line 24
No upload-size cap enforced at the framework or reverse-proxy level
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
File Upload Security Check (A04:2025)
What this checks
Protects against unrestricted file upload attacks where an attacker uploads executable files (web shells, scripts, HTML with embedded JS) that the server later serves or executes. Exploitation leads to remote code execution, stored XSS, or full server compromise.
Vulnerable patterns
- Upload handler that writes the user-supplied filename directly to disk, enabling path traversal and extension bypass
- Upload destination inside the web-accessible document root, so uploaded content is served directly by the web server
- No extension allowlist, or an extension denylist that misses novel or case-varied extensions
- No upload-size cap enforced at the framework or reverse-proxy level
- MIME type taken from the client-supplied
Content-Typeheader rather than the file's magic bytes
Fix immediately
Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties:
- Extension is validated against an allowlist, never a denylist. Denylists
miss novel extensions (
.phtml,.phar,.svg) and case variations. An allowlist of expected types (.png,.jpg,.pdf) fails closed. - The user-supplied filename is never used as the storage path. Rename the
file to a CSPRNG identifier, preserving only the validated extension. This
defeats path traversal (
../../etc/passwd), overwrites of existing files, and filename-based XSS on download. - Uploads are written outside the webroot. The server must not serve them
directly — files are handed out through an application route that sets a safe
Content-TypeandContent-Disposition: attachment, never inferred from the filename. - Size is capped at the framework or proxy level, not just inside the handler. A handler-only check lets a multi-gigabyte upload exhaust memory before the check runs.
- MIME type is validated against the file's magic bytes, not the
Content-Typeheader the client sent — the header is attacker-controlled.
Translate these principles to the audited file's language and framework. Use the framework's documented upload-size limit, storage path configuration, and content-type sniffing helper — do not hand-roll path joining or extension parsing.
Verification
Confirm the following properties hold (language-agnostic):
- Only explicitly-allowed file extensions are accepted — enforced via an allowlist, not a denylist
- The user-supplied filename is never used as the storage path — files are renamed to a random or hashed identifier
- Uploaded files are stored outside the web-accessible document root
- A maximum upload size is enforced at the framework or reverse-proxy level
- Files are served with
Content-Disposition: attachmentand a safe, explicitContent-Type— never inferred from the filename
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

