Skip to content
Info disclosure Disclosed report Beginner

Internal Path Disclosure

A file upload endpoint returned a 500 error that disclosed internal file paths when a crafted filename was used. An attacker could learn server directory structure, which may aid further attacks.

mr_vrush Follow

Originally disclosed on HackerOne

Bounty$100 Low View original
  • Triaged in 8 hours
  • Fixed in 13 hours
  • Paid in 8 hours
  • Disclosed after 13 hours

Hello Team, I would like to report internal path disclosure in response. I was trying for Stored XSS but got no luck in that process. I observed the responses, one of the responses showing file path with 500 Internal Server Error.

Steps To Reproduce:

  1. Go to cs.money and sign in through steam account.
  2. Now click on chat support icon
  3. Now try to upload file while uploading capture the request in burp and send it to the repeater.
  4. Edit the request as shown in below.

Content-Disposition: form-data; name="file"; filename="/../../../../../.html" Content-Type: image text/html Content-Type: text/html


"5. After editing forward the request and observe the response. "6. Response is 500 Internal Server Error with these two path in the response.

Supporting Material/References:

  1. Image █████ shows edited part of the request.
  2. Image █████ shows the response.
  3. Image ███████ shows response in the browser.

Impact

This issue is not a major threat to security, but this information usually contains sensitive information.

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

CS Money is a skin trading platform, and the asset in scope here is support.cs.money, the support side of the site. The feature involved is the chat support widget: a signed-in user can open a support conversation and attach a file to it. The report is about what the server returns when that upload is malformed in a particular way.

The researcher was not looking for path disclosure. The stated goal was Stored XSS, and the path disclosure was found while reading responses during that attempt. The weakness class recorded for the report is File and Directory Information Exposure, with low severity and a 100.00 USD bounty.

Setup

  • A CS Money account, signed in through Steam.
  • Access to the chat support icon on the site.
  • Burp Suite, used to capture the upload request and replay it in Repeater.

No particular browser, server version or account role beyond a normal signed-in user is described.

Finding it

While probing the file upload for Stored XSS, the researcher watched the responses. One response came back as 500 Internal Server Error and contained a file path. That is the whole of the discovery: a server-side error on a malformed upload that leaks an internal path in the error output.

Exploitation

Step 1: sign in

Go to cs.money and sign in through a Steam account.

Step 2: open the support chat

Click the chat support icon. This is the widget that carries the file upload.

Step 3: capture the upload

Start a file upload and capture the request in Burp, then send it to Repeater. The upload is a normal multipart/form-data POST, which is what makes the next step possible: the filename and the part headers are fully attacker-controlled.

Step 4: edit the request

The request is edited as shown below. This is the exact fragment from the report:

HTTP
Content-Disposition: form-data; name="file"; filename="/../../../../../.html"
Content-Type: image   text/html
Content-Type: text/html

The important parts:

  • name="file" is the original form field name, left untouched.
  • filename="/../../../../../.html" replaces the normal filename with an absolute-looking path that walks up five directories and ends in .html. The leading slash and the traversal segments are the payload.
  • The two Content-Type lines are malformed on purpose. The first one, Content-Type: image text/html, is not a valid header value, and it is followed by a second, well-formed Content-Type: text/html. The report does not say which part of the edited request caused the error.

Step 5: forward the request

Forward the edited request and observe the response.

Step 6: read the response

The response is 500 Internal Server Error, and it contains two file paths. The report does not reproduce the paths themselves; it only states that two paths appear in the error body. The researcher also confirms the same result in the browser.

Root cause

The response was a 500 Internal Server Error whose body contained two internal file paths. The malformed Content-Type headers and the traversal-style filename are enough to make that failure happen.

The report does not identify the specific component or library that produced the message.

Impact

The researcher is explicit that this is not a major threat to security, but notes that path information of this kind usually contains sensitive information. In practice the leak tells an attacker about the server's directory layout, which can help when chaining with other bugs such as file upload or traversal issues. It requires only a signed-in account and access to the support chat. The report does not demonstrate reading any file, only the disclosure of paths in an error response.

Fix

The report does not describe a fix or a retest. The general remedy for this class of issue is to stop returning internal paths to clients: catch the upload failure, log the detail server-side, and return a generic error response. Validating and normalising the client-supplied filename before use removes the input that triggers the failure in the first place.

Variants to test

  • Send the same malformed Content-Type pair with a benign filename. A positive result is a 500 whose body still contains a path, which shows the error handling, not the traversal string, is the trigger.
  • Vary the number of ../ segments and the leading slash. A positive result is the same path disclosure with a different filename, confirming the filename is passed through unvalidated.
  • Try other malformed part headers on the same upload endpoint, for example a missing or duplicated Content-Disposition. A positive result is another verbose error body.
  • Repeat the upload on other endpoints of the same application that accept files, such as avatar or attachment uploads. A positive result is any error response that reveals a filesystem path.

Hunting notes

This kind of bug hides in error paths rather than in successful responses, so the useful habit is to read every 500 you cause, not just the 200s. File uploads are a good place to look because the client controls the filename and the part headers, and malformed values are an easy way to reach exception handlers.

During recon, the signal is any endpoint that accepts multipart/form-data and any application that returns detailed errors. Sending a deliberately broken part header and checking whether the body contains a path is a quick test.

The report describes a 500 with internal paths in the response, reached from a signed-in account through the support chat. The researcher stated the issue is not a major threat to security.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

CS Money is a website where people trade in-game items (skins). The part of the site involved here is support.cs.money, the support area. On that support area there is a chat widget: you open a conversation with support and you can attach a file to your message, for example a screenshot of your problem.

When you attach a file, your browser sends that file to the server. The server is the computer that runs the website. Normally the server saves the file and replies with something friendly like "upload complete".

In this report, the researcher sent a deliberately broken upload instead of a normal one. The server did not handle the breakage gracefully. It returned a 500 Internal Server Error, and that error message contained internal file paths. A file path is the address of a file on a computer, something like the folders you see in a file manager. Those addresses are normally private to the server and are not meant to be shown to visitors.

The researcher was not hunting for this. The stated goal was Stored XSS, a different kind of bug where a script you plant on a site runs later in other people's browsers. While trying that, the researcher read the server's replies and noticed one of them was an error containing a path. That accidental find is the whole report.

The weakness is classed as File and Directory Information Exposure, severity low, with a 100.00 USD bounty. The report was disclosed on 2020-09-11.

The pieces you need to know

Before the steps, a few ideas from zero.

Request and response. When you click something on a website, your browser sends a request to the server and the server sends back a response. Think of it as posting a letter and getting a reply. The reply has a status code, a number that says how it went. 200 means fine. 500 means the server hit an internal problem, the equivalent of a shop assistant saying "something went wrong in the back room".

Multipart form data. When a web page lets you upload a file, the browser cannot just paste the file into a normal text form. It uses a format called multipart/form-data, which packs the request into several labelled sections, like several envelopes inside one bigger envelope. Each section has a small header block describing it. One header, Content-Disposition, says which form field the section belongs to and, for a file, what the file is called. Another header, Content-Type, says what kind of content it is, for example text/html for a web page or image/png for a picture.

Filename and traversal. The filename in an upload is supplied by the client, meaning your browser, meaning you. The server is supposed to treat it as a label, not as an instruction. A sequence like ../ means "go up one folder" in a file path. Chaining several of them, ../../../../../, is called path traversal: an attempt to climb out of the folder the server intended and reach somewhere else on the disk. Here the traversal string is part of the filename that gets sent, and the point of the test is to see how the server reacts to it.

Burp Suite and Repeater. Burp Suite is a tool that sits between your browser and the website and lets you look at, and change, the requests your browser sends. Repeater is one of its windows: you put a request in, press send, and read the response, over and over, changing one thing each time. It is like being able to reopen and rewrite a letter before posting it again.

Stored XSS. Stored XSS is a bug where an attacker manages to save something (often a snippet of script) on the site, and the site later shows it to other users, whose browsers then run it. The researcher was looking for a way to get such content past the upload, and did not find one.

Internal path disclosure. This is the bug in the report. The server's error message includes a real path from its own filesystem. It does not let anyone read a file; it just tells them where things live on the server. That is why the severity is low.

Setup

  • A CS Money account, signed in through Steam. Steam is the gaming platform whose login CS Money uses, so you sign in with your Steam account rather than a separate CS Money password.
  • Access to the chat support icon on the site.
  • Burp Suite, used to capture the upload request and replay it in Repeater.

No particular browser, server version or special account role is described beyond a normal signed-in user.

Finding it

While probing the file upload for Stored XSS, the researcher watched the responses. One response came back as 500 Internal Server Error and contained a file path. That is the whole of the discovery: a server-side error on a malformed upload that leaks an internal path in the error output.

Exploitation

Step 1: sign in

Go to cs.money and sign in through a Steam account. You need to be a normal signed-in user because the support chat, and therefore the upload, is only available to logged-in users.

Step 2: open the support chat

Click the chat support icon. This is the widget that carries the file upload. Opening it is how you reach the feature being tested.

Step 3: capture the upload

Start a file upload and capture the request in Burp, then send it to Repeater. The upload is a normal multipart/form-data POST, which is what makes the next step possible: the filename and the part headers are fully under your control, because your browser builds them from what you choose. Capturing the request means freezing it mid-flight so you can edit it before it reaches the server.

Step 4: edit the request

The request is edited as shown below. This is the exact fragment from the report:

HTTP
Content-Disposition: form-data; name="file"; filename="/../../../../../.html"
Content-Type: image   text/html
Content-Type: text/html

Line by line:

  • Content-Disposition: form-data; name="file"; filename="/../../../../../.html" is the header that labels this section of the upload. name="file" is the original form field name, left untouched, so the server still recognises which field this is. filename="/../../../../../.html" replaces the normal filename with an absolute-looking path that walks up five directories and ends in .html. The leading slash and the traversal segments are the payload.
  • Content-Type: image text/html is the first content type line. It is malformed on purpose: image text/html is not a valid header value.
  • Content-Type: text/html is a second, well-formed content type line. The report does not say which part of the edited request caused the error.

Step 5: forward the request

Forward the edited request and observe the response. Forwarding means letting the edited request continue on to the server, so you can see what it does with your changes.

Step 6: read the response

The response is 500 Internal Server Error, and it contains two file paths. The report does not reproduce the paths themselves; it only states that two paths appear in the error body. The researcher also confirms the same result in the browser.

Why it happens

The response was a 500 Internal Server Error whose body contained two internal file paths. The malformed Content-Type headers and the traversal-style filename are enough to make that failure happen.

The report does not identify the specific component or library that produced the message.

Impact

The researcher is explicit that this is not a major threat to security, but notes that path information of this kind usually contains sensitive information. In practice the leak tells an attacker about the server's directory layout, which can help when chaining with other bugs such as file upload or traversal issues. It requires only a signed-in account and access to the support chat. The report does not demonstrate reading any file, only the disclosure of paths in an error response.

Fix

The report does not describe a fix or a retest. The general remedy for this class of issue is to stop returning internal paths to clients: catch the upload failure, log the detail server-side, and return a generic error response. Validating and normalising the client-supplied filename before use removes the input that triggers the failure in the first place.

Variants to test

  • Send the same malformed Content-Type pair with a benign filename. A positive result is a 500 whose body still contains a path, which shows the error handling, not the traversal string, is the trigger.
  • Vary the number of ../ segments and the leading slash. A positive result is the same path disclosure with a different filename, confirming the filename is passed through unvalidated.
  • Try other malformed part headers on the same upload endpoint, for example a missing or duplicated Content-Disposition. A positive result is another verbose error body.
  • Repeat the upload on other endpoints of the same application that accept files, such as avatar or attachment uploads. A positive result is any error response that reveals a filesystem path.

Hunting notes

This kind of bug hides in error paths rather than in successful responses, so the useful habit is to read every 500 you cause, not just the 200s. File uploads are a good place to look because the client controls the filename and the part headers, and malformed values are an easy way to reach exception handlers.

During recon, the signal is any endpoint that accepts multipart/form-data and any application that returns detailed errors. Sending a deliberately broken part header and checking whether the body contains a path is a quick test.

The report describes a 500 with internal paths in the response, reached from a signed-in account through the support chat. The researcher stated the issue is not a major threat to security.

Glossary

  • Server: the computer that runs a website and answers requests from visitors' browsers.
  • Request: the message your browser sends to a server when you do something on a site.
  • Response: the message the server sends back, including a status code and a body.
  • Status code: a number in the response saying how the request went, such as 200 for success or 500 for a server-side failure.
  • 500 Internal Server Error: a status code meaning the server hit an unexpected problem while handling the request.
  • Multipart form data: a request format that packs several labelled sections, used for file uploads.
  • Header: a line in a request or response that describes it, such as what kind of content it carries.
  • Content-Disposition: the header that names the form field and, for a file, the filename.
  • Content-Type: the header that says what kind of content a section holds, such as text/html or image/png.
  • Filename: the name of a file, here supplied by the client and therefore controllable by the user.
  • Path: the address of a file or folder on a computer's disk.
  • Path traversal: using ../ sequences in a path to try to climb out of the intended folder.
  • File and Directory Information Exposure: the weakness class where information about files or folders on the server is revealed to a user.
  • Internal path disclosure: a server error that shows real filesystem paths to the client.
  • Stored XSS: a bug where content saved on a site is later shown to other users and runs as script in their browsers.
  • Burp Suite: a tool that sits between browser and website so you can inspect and edit requests.
  • Repeater: the Burp Suite window where you resend a captured request after editing it.
  • Endpoint: a specific address on a site that accepts requests, such as the upload handler.
  • Recon: the exploratory phase of testing where you map out what a site does.
  • Exception handler: the part of a program that deals with errors; if it is verbose, it may reveal internal detail.
  • Validation and normalisation: checking input is acceptable and rewriting it into a standard, safe form before use.
  • Severity: a rating of how serious a bug is, here low.
  • Bounty: the money a programme pays for a valid report, here 100.00 USD.

More by mr_vrush

View all

3 more disclosed reports, best first.

More from CS Money

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.