Skip to content
Business logic Disclosed report Intermediate CVE-2019-15601

curl still vulnerable to SMB access smuggling via FILE URL on Windows

The fix for CVE-2019-15601 did not fully block SMB access via FILE URLs on Windows. An attacker could craft a URL that causes curl to fetch a file from a remote SMB share, potentially leaking local or remote file contents.

tsedlmeyer Follow

Originally disclosed on HackerOne

  • Disclosed after 10 months

Summary:

The released fix for CVE-2019-15601, SMB access smuggling via FILE URL on Windows, leaves curl still vulnerable to SMB access smuggling via FILE URLs.

  • FILE URLs formatted as file:////smb_server/smb_share/file are not filtered.
  • FILE URLs which point to the global DOS name space, ??, and formatted as file:///%3f%3f/UNC/smb_server/smb_share/file_name or file:///%3f%3f/GLOBAL/UNC/smb_server/smb_share/file are not filtered.

Steps To Reproduce:

  1. curl file:////localhost/c$/windows/win.ini
  2. curl file:///%3f%3f/UNC/localhost/c$/windows/win.ini
  3. curl file:///%3f%3f/GLOBAL/UNC/localhost/c$/windows/win.ini

The above examples will return the contents of C:\Windows\win.ini utilizing SMB to fetch the file via the local administrative share for the C drive. This will also work with remote shares.

Impact

A properly crafted URL could cause a user to unknowingly access a remote file.

The original report as published on HackerOne, by tsedlmeyer. 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 fix only blocked certain FILE URL patterns but missed alternative formats that still resolve to SMB paths on Windows.

Impact

A crafted URL could cause a user to unknowingly access a remote file via SMB.

What the attacker needed

Windows system; curl with FILE URL support; user runs curl on a crafted URL

How it was found

  1. Run curl with a FILE URL using four slashes to point to a local administrative share.
  2. Run curl with a FILE URL using encoded question marks to point to the global DOS namespace.
  3. Run curl with a FILE URL using encoded question marks and GLOBAL to point to the global DOS namespace.

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.

curl is a tool for downloading files from the internet. On Windows, a special kind of address starting with 'file:' can make curl read files from network shares. The report shows that some of these addresses still work even after a fix, so a user could be tricked into reading a file from another computer.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from curl

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.