path-traversal
Skill18 starsChanged 3 months agoMITView on GitHub
Analyze path traversal and unsafe file access — use when user input influences file paths, downloads, includes, zip extraction, or static file send APIs (CWE-22 / A01:2021).
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- thejefflarson/soundchecktheir own version, first seen Jul 31, 2026
- hackingyseguridad/IAtheir own version, first seen Jun 19, 2026
- langbyyi/websec-skillstheir own version, first seen Jun 12, 2026
- ShulkwiSEC/bb-hugetheir own version, first seen Jun 4, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- ShulkwiSEC/bb-huge★ 22same name
- thejefflarson/soundcheck★ 20same name
- langbyyi/websec-skills★ 4same name
- hackingyseguridad/IA★ 3same name
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 repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-agent-securitySkill
- ai-application-securitySkill
- api-securitySkill
- attack-surface-mappingSkill
- authentication-analysisSkill
- authorization-analysisSkill
- axguard-auditSkill
- axguard-csoSkill
- axguard-knowledgeSkill
- axguard-preshipSkill
- axguard-remediateSkill
- axguard-reportSkill
- axguard-securitySkill
- axguard-triageSkill
- cloud-securitySkill
- command-injectionSkill
- configuration-securitySkill
- deserialization-securitySkill
- file-upload-securitySkill
- graphql-securitySkill
- jwt-securitySkill
- mcp-securitySkill
- oauth-securitySkill
- prompt-injectionSkill
- prototype-pollutionSkill
- secrets-detectionSkill
- security-architecture-reviewSkill
- security-remediationSkill
- security-triageSkill
- session-securitySkill
- sql-injectionSkill
- ssrf-analysisSkill
- ssti-analysisSkill
- supply-chain-securitySkill
- threat-modelingSkill
- websocket-securitySkill
- xss-analysisSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
After AXguard hits path.*.
- Very specific: line 57
Read secrets (/etc/passwd, .env, cloud creds, keys).
- Distinctive: line 65
Check normalization order: decode → normalize → root check (watch double-encoding).
- Distinctive: line 66
Verify post-resolve containment under intended root (not prefix string checks alone).
- Distinctive: line 87
Do not concatenate untrusted strings into filesystem paths.
- Distinctive: line 88
Use object storage keys or random stored names.
- Distinctive: line 89
After resolve, enforce directory containment.
- Distinctive: line 91
Run with least file privileges.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Path Traversal Analysis
Purpose
Encode defensive reasoning for path traversal (and related LFI/zip-slip): attacker-controlled path segments escape an intended directory and read/write unintended files.
When to Use / When Not to Use
Use when:
open,send_file,sendFile,include/requireof dynamic paths, download-by-name, template path params, archive extraction, cloud key prefixes built from user input.- After AXguard hits
path.*. - Upload features store user-chosen filenames (pair with
file-upload-security).
Do not use when:
- Paths are fully server-derived IDs mapped via DB to stored objects with no filesystem join of raw names.
- Pure URL path routing without filesystem access (authorization issues belong in
authorization-analysis).
Security Concepts
Traversal uses ../, encoded variants, absolute paths, symlink tricks, and archive entries with ../ (zip-slip). Safe pattern: resolve to absolute path, then verify it remains under an allowlisted root (commonpath / startsWith after normalization).
Threat Model
Attacker goals:
- Read secrets (
/etc/passwd,.env, cloud creds, keys). - Overwrite app code, templates, or SSH keys (when write sinks exist).
- Include/execute unintended files (language-specific LFI → RCE).
Analysis Workflow
- Find filesystem sinks: open/read/write, download helpers, dynamic includes, unzip/untar.
- Trace user influence on filename, relative segment, or archive entry name.
- Check normalization order: decode → normalize → root check (watch double-encoding).
- Verify post-resolve containment under intended root (not prefix string checks alone).
- For archives: validate each entry path before extract; reject absolute/
..entries. - Note symlink following behavior of the API.
- Assess impact by readable/writable sensitivity of the process sandbox.
Evidence Requirements
- Sink file:line and path construction
- Missing canonicalization or root containment
- Attacker-controlled segment
- Impact hypothesis (secret read / overwrite / include)
False Positive Controls
- Opaque object IDs with server-side path map
- Strict allowlist of filenames/extensions mapped to fixed directory
- Paths constrained to UUID-only with no separators after validation
- Docs/examples not reachable in production code paths
Remediation
- Do not concatenate untrusted strings into filesystem paths.
- Use object storage keys or random stored names; keep display names separate.
- After resolve, enforce directory containment.
- Harden zip extraction (strip paths, reject
.., extract to empty temp dir). - Run with least file privileges; no secrets in web-readable trees.
Verification
Detect path joins → Enforce root containment / ID maps → Re-run axguard → Add tests for ../ and encoded variants (authorized fixtures only)Related Skills
file-upload-security— malicious names and content typescommand-injection— path args passed to shellsapi-security,security-triage,security-remediation
Framework Mapping
- CWE-22
- OWASP Top 10 2021 A01:2021 Broken Access Control
References
- https://owasp.org/Top10/A01_2021-Broken_Access_Control/
- https://cwe.mitre.org/data/definitions/22.html
Research Provenance
Primary sources:
- OWASP Top 10:2021 A01 (accessed 2026-09-15)
- CWE-22 (accessed 2026-09-15)
Secondary / internal:
- AXGuard
rules/path.json,/axguard-path - AwareXone Agentic-Bug-Hunter path/LFI methodology (concepts only; not copied)
Datasets:
- UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)
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.

