Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Path Traversal

BSecurity

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).

15 stars
0 votes
0 copies
0 views
Added 9/22/2026
securityrustgoshellapisecurity

Works with

api

Security Analysis

B75/100
criticalAccesses sensitive system or user directories

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add awarexone/AXguard --skill path-traversal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Path Traversal?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Path Traversal
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/awarexone-path-traversal/badge)](https://www.skillsdirectory.com/skills/awarexone-path-traversal)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: path-traversal
description: 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).
version: "1.0.0"
author: AwareXone
license: MIT
domain: application-security
subcategory: web-security
tags: [path-traversal, lfi, zip-slip, cwe-22]
frameworks:
  cwe: [CWE-22]
  owasp_top10: [A01:2021]
  owasp_api_top10: []
  owasp_llm_top10: []
  owasp_wstg: []
  owasp_asvs: []
  mitre_attack: []
  mitre_atlas: []
  nist_csf: []
  nist_ai_rmf: []
related_skills: [file-upload-security, command-injection, api-security, security-triage, security-remediation]
related_commands: [/axguard-path, /axguard-upload, /axguard-audit]
related_rules: [path.]
references:
  - https://owasp.org/Top10/A01_2021-Broken_Access_Control/
  - https://cwe.mitre.org/data/definitions/22.html
last_reviewed: "2026-09-15"
---

# 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`/`require` of 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:

1. Read secrets (`/etc/passwd`, `.env`, cloud creds, keys).
2. Overwrite app code, templates, or SSH keys (when write sinks exist).
3. Include/execute unintended files (language-specific LFI → RCE).

## Analysis Workflow

1. Find filesystem sinks: open/read/write, download helpers, dynamic includes, unzip/untar.
2. Trace user influence on filename, relative segment, or archive entry name.
3. Check normalization order: decode → normalize → root check (watch double-encoding).
4. Verify **post-resolve** containment under intended root (not prefix string checks alone).
5. For archives: validate each entry path before extract; reject absolute/`..` entries.
6. Note symlink following behavior of the API.
7. 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

1. Do not concatenate untrusted strings into filesystem paths.
2. Use object storage keys or random stored names; keep display names separate.
3. After resolve, enforce directory containment.
4. Harden zip extraction (strip paths, reject `..`, extract to empty temp dir).
5. Run with least file privileges; no secrets in web-readable trees.

## Verification

```text
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 types
- `command-injection` — path args passed to shells
- `api-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)

Attribution

awarexoneawarexone
View sourceMore from awarexone →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Springboot Security

Java Spring Boot 服务中关于身份验证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全的 Spring Security 最佳实践。

2456590 votes

Security Review

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

2456590 votes

Paperclip Task Bridge

Create, comment on, update, and list Paperclip tasks from Hermes using scoped Paperclip API credentials.

805540 votes

Summarize Status

Write a short, colloquial summary for a Paperclip summary slot: open with the 1–3 specific, concrete actions the reader needs to take right now to unblock the work, then a brief plain-language status, streaming progress as it works.

805540 votes

Paperclip Evals

Choose, inspect, validate, and report Paperclip Runner or Product E2E evaluations while preserving evidence, provenance, cost, and failure classification.

805540 votes
View all in security →