What problem does it solve?
This skill analyzes PHP project source code to identify and validate arbitrary file write vulnerabilities by tracing user-controlled data from input to sink, validating path traversal to final write targets, and assessing whether newly written content could be executed.
Core Features & Use Cases
- Write sink detection: identify writes to disk via functions like file_put_contents, fwrite, stream_write, fopen in write or append modes, and rename/copy-based write paths.
- Path traversal and normalization checks: evaluate how base directories are constructed, detect traversal patterns, and verify final resolved path remains within allowed base.
- Content origin tracing: map input sources (GET/POST/COOKIE/Upload) to their use in write operations to assess exploitability.
- Execution feasibility assessment: determine if the write destination is within web-accessible or executable directories and whether execution is possible.
- Use Case: Audit a PHP web application to catch unconstrained user writes that could lead to remote file inclusion or code execution.
Quick Start
Run the audit against your PHP codebase to trace user data through write sinks to potential targets and report on executable risk.