Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Detects path traversal vulnerabilities via recon, batched subagent verification, consolidated reporting to sast/pathtraversal-results.md.
68% 86%+18 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
Not used yet
You are performing a focused security assessment to find path traversal vulnerabilities in a codebase. This skill uses a three-phase approach with subagents: recon (find file-loading sinks with dynamic paths), batched verify (trace user input and check mitigations in parallel batches of 3), and merge (consolidate batch results into one report).
Prerequisites: sast/architecture.md must exist. Run the analysis skill first if it doesn't.
Path traversal (also called directory traversal) occurs when user-supplied input is incorporated into a file path that is then used to read, write, or serve files from the filesystem — without properly constraining the resulting path to an intended base directory. An attacker can supply sequences like ../ or encoded variants (%2e%2e%2f, ..%2f, %2e%2e/) to escape the intended directory and access arbitrary files such as /etc/passwd, application source code, credentials, or private keys.
The core pattern: unvalidated user input reaches a filesystem operation and the resolved path is not verified to remain within the intended base directory.
open(os.path.join(BASE_DIR, user_filename))fs.readFile(path.join(__dirname, req.query.file), ...)include($_GET['page'] . '.php')ZipFile, tarfile, zipslip) where entry names are used as output paths without stripping ../ componentssend_file() / send_from_directory() / res.sendFile() with an unsanitized user-controlled pathDo not flag these as path traversal:
realpath() and verifies it starts with the intended base directoryWhen you see these mitigations applied before the file operation, the code is likely not vulnerable:
Next to this one in the catalogue, plus more from the same author.