Skip to content
Path traversal Disclosed report Intermediate CVE-2026-80256CVE-2025-11563

CVE-2026-80256: wcurl backslash bypass

The wcurl helper script's filename derivation only filters percent-encoded slashes and backslashes, so a literal backslash in a URL survives into the automatic output filename. On Windows this lets an attacker-controlled URL write a new file outside the user's chosen working directory, within that user's filesystem permissions.

1rhino2 Follow

Originally disclosed on HackerOne

  • Triaged in 10 hours
  • Fixed in 7 days
  • Disclosed after 8 days

At https://github.com/curl/curl/blob/curl-8_21_0/scripts/wcurl#L198, get_url_filename() protects percent-encoded %2F and %5C, but leaves a literal backslash unchanged before it becomes the automatic output filename.

On Windows, run wcurl.bat "http://127.0.0.1:PORT/sub\..\..\escaped.txt" from sandbox\inside while a local server returns a marker; curl exits 0 and creates sandbox\escaped.txt outside the working directory.

I reproduced this twice on native Windows 10 build 19045 using the current official curl 8.21.0_7 x64 archive, including its shipped wcurl.bat, wcurl, and curl.exe.

The control URL ending sub%5C..%5C..%5Cescaped.txt stays inside the working directory, so the published CVE-2025-11563 percent-encoding repair works while the literal-backslash bypass remains.

To rerun it, extract the official archive, obtain busybox64u.exe from https://github.com/rmyorston/busybox-w32, then run python3 02-poc-wcurl-literal-backslash.py --curl-bin ./curl-8.21.0_7-win64-mingw/bin --busybox ./busybox64u.exe --work-dir ./poc-output.

I used AI to assist the source audit and drafting, and personally reran the release proof, control, current-tree check, and all 28 upstream tests.

Impact

An attacker-controlled URL can make wcurl create a new attacker-controlled file outside the directory chosen by a Windows user, subject to that user's filesystem permissions and the target not already existing; modern curl's --no-clobber prevents overwriting an existing target.

The original report as published on HackerOne, by 1rhino2. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

How it worked

Root cause

Likely the filename sanitiser only strips percent-encoded separators and does not normalise or reject literal backslash characters before using the URL path as an output filename.

Impact

An attacker-controlled URL could cause wcurl to create a new attacker-named file outside the directory the Windows user chose, limited by that user's filesystem permissions and blocked from overwriting existing files by --no-clobber.

What the attacker needed

Windows host; user runs wcurl on an attacker URL; target file does not already exist

How it was found

  1. Extract the official curl Windows archive and obtain the busybox binary.
  2. Run the proof-of-concept script pointing it at the curl bin directory, busybox and an output work directory.
  3. From a subfolder inside the sandbox, invoke wcurl.bat with a URL containing a literal backslash and dot-dot segments while a local server returns a marker.
  4. Observe curl exit with success and a file created outside the working directory.

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 report has not been written yet. The Original tab links to the source.

wcurl is a small wrapper that downloads a URL and names the saved file after the URL. It tried to block tricks where the URL contains encoded slashes that could push the file into another folder, but it forgot that a plain backslash character also separates folders on Windows. So a crafted link could drop a file somewhere the user did not intend.

What is Path traversal?

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

More by 1rhino2

View all

12 more disclosed reports, best first.

More from curl

View all

The newest disclosed reports for this program.

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.