Skip to content
Path traversal Write-up Intermediate

CSPT the Eval Villain Way!

A client-side path traversal (CSPT) flaw allowed the URL path to be used in a fetch request, and the response from that request was then used in the path of an authenticated POST request. An attacker could combine this with an open redirect to send the first request to their own server and have the response used in the second request, enabling a CSPT-to-CSRF exploit chain.

blog.doyensec.com

Published on blog.doyensec.com

Doyensec’s Maxence Schmitt recently built a playground to go with his CSPT research. In this blog post, we will demonstrate how to find and exploit CSPT bugs with Eval Villain.

Dennis Goodlett, on blog.doyensec.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application used the URL path directly in a client-side fetch without validating or encoding it, and then used the response in a subsequent authenticated request.

Impact

An attacker could chain the CSPT with an open redirect so the first request goes to their server, and its response is used in an authenticated POST request.

What the attacker needed

An open redirect exists on the site; the CSPT response is used in an authenticated request

How it was found

  1. Log into the playground and visit the CSPT2CSRF page.
  2. Open the browser console and ensure Eval Villain is enabled.
  3. Enable 'Path search' in Eval Villain's settings and refresh the page.
  4. Append an encoded traversal string to the URL path and refresh to test for CSPT.
  5. Enable the evSourcer global in Eval Villain's configuration.
  6. Use the stack trace to find where the CSPT response is handled and add a conditional breakpoint with evSinker to ingest the response.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A web page took part of the address you typed (the path) and used it to make another request. Because the page did not check that the path stayed on its own site, an attacker could make the page request a different server. The reply from that server was then used in a second, logged-in request, so the attacker could make the victim's browser perform actions on their behalf.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.