Client-Side Path Traversal to CSRF (CSPT2CSRF) and client-side path traversal — manipulating path segments used to build client-side API requests so a GET/state-changing request is redirected to an attacker-chosen endpoint, turning reflected path traversal in front-end code into CSRF/data exfiltration without a token. Tier 1 [NEW/RARE]. Use for SPAs that build API paths from URL/user input.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cspt2csrf?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-cspt2csrf)
---
name: cspt2csrf
description: Client-Side Path Traversal to CSRF (CSPT2CSRF) and client-side path traversal — manipulating path segments used to build client-side API requests so a GET/state-changing request is redirected to an attacker-chosen endpoint, turning reflected path traversal in front-end code into CSRF/data exfiltration without a token. Tier 1 [NEW/RARE]. Use for SPAs that build API paths from URL/user input.
---
# Client-Side Path Traversal → CSRF (CSPT2CSRF)
Front-end JS that builds an API path from user-controlled input can be path-traversed so the client sends a request to an unintended endpoint — often a CSRF primitive that rides the victim's cookies and a valid token.
## Trigger phrases
`cspt2csrf, client side path traversal, cspt, path traversal csrf, api path manipulation`
## Method
1. Find client code building an API URL from a URL param/path segment (`fetch('/api/'+id+'/info')`).
2. Inject traversal (`../../`, encoded `%2e%2e%2f`, `..%2f`) in the controllable segment so the resolved path points at a different, sensitive endpoint (e.g., a state-changing POST or a data endpoint).
3. **CSPT2CSRF:** steer the client's authenticated request (with its CSRF token auto-added by the SPA) to an attacker-chosen action/endpoint → CSRF without needing the token, or exfiltrate a response the attacker can read via a reflected sink.
4. Confirm the request reaches the hijacked endpoint in the victim's context.
## Escalation
Token-protected CSRF, authenticated data exfiltration, or chaining to an action the SPA otherwise guards.
## Backend & tooling
Preferred Kali path or headless browser for client-side execution/evidence; if a Burp MCP is present, proxy traffic for visibility and send PoCs to Repeater (see `zazy-orchestrator`).
## Verification (background, before reporting)
Reproduce in a real browser / second context and confirm impact before marking CONFIRMED; use OAST for blind cases. Report true positives only.
## Evidence
The client path-building sink, the traversal payload, and proof the authenticated request hit the hijacked endpoint.