Don’t underestimates the Errors They can provide good $$$ Bounty!
A bot chat subdomain returned an error containing a server-side source code path when the Host header was removed from the request. An attacker could learn internal filesystem paths from this error response.
Published on medium.com
Today I am gonna tell you how I got $$$ bounty. On that day i was founding any good bug bounty program which have a wider Scope.
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.
Context
Mamba runs a public bug bounty programme with a wide scope, and the researcher picked it for that reason. One of those subdomains, https://bot.mamba.ru, hosts a bot chat feature: a page where a visitor sends messages to a bot. That chat page is the only asset involved in the finding.
The bug itself is not in the chat logic. It is in how the server behind bot.mamba.ru handles a request that arrives without a Host header. Instead of rejecting the request cleanly, the server returned an error that leaked a path from the server's filesystem.
Setup
No accounts, roles or special tooling are described. The researcher intercepted the bot chat request to modify it; the report does not name the tool used.
Finding it
After roughly an hour of subdomain enumeration, the researcher settled on https://bot.mamba.ru, which looked like a dummy bot chat subdomain. The plan was to interact with the chat and look for injection points.
- Send a message to the bot and intercept the resulting request in the proxy.
- Try XSS payloads in the message. Nothing happened.
- Try host header injection on the same request. Again nothing.
- Accidentally delete the
Hostheader from the request and forward it.
The last step produced the result. The server answered with a 401 error whose body contained a source code path from the server, which the researcher describes as a server-side misconfiguration. The expectation for a request with no Host header is a 400 Bad Request; the server instead returned 401 together with sensitive information. The path in the published screenshot is masked.

Exploitation
Step 1: capture the bot chat request
Send a message to the bot on https://bot.mamba.ru with the proxy intercepting, so the request can be edited before it reaches the server.
Step 2: test injection points
Attempt XSS through the message content, then attempt host header injection by modifying the Host header. Neither produced a result.
Step 3: remove the Host header
Delete the Host header from the captured request entirely and forward it. The server responded with a 401 status and an error body that disclosed a server-side source code path. The researcher notes that a correctly configured server would have returned 400 Bad Request for this request.

Root cause
The report attributes the leak to a server-side misconfiguration: the virtual host or application in front of bot.mamba.ru does not validate the presence of the Host header before routing the request, and its error handling then includes internal path information in the response body. The exact component that generated the error is not identified in the report.
Impact
The disclosure was a source code path in an error response returned when the Host header was removed. The researcher masked the path in the published screenshot. The report does not describe any further use of the leaked path, such as reading files or reaching other endpoints, so the practical impact is information disclosure that helps an attacker map the server's layout. Mamba's security team classified it as a valid issue and paid a bounty of 200.00 USD.
Fix
The general fix implied by the researcher's expectation is to reject requests that lack a valid Host header with 400 Bad Request before they reach the application, and to stop returning internal paths in error responses.
Variants to test
- Send requests with no
Hostheader to other subdomains of the same programme and look for error bodies containing filesystem paths, stack traces or framework names. A positive result is a4xxor5xxresponse whose body includes an absolute path or internal identifier. - Send a malformed
Hostheader, such as an empty value or a duplicated header, and compare the response with the no-header case. A positive result is a different error body from the baseline, especially one that names an internal component. - Repeat the same test on HTTP/1.0 requests, where the
Hostheader is optional, and on requests routed through a proxy that may strip it. A positive result is the same path disclosure appearing through a different entry point. - Test other headers whose absence can trigger verbose errors, such as
Content-Lengthon aPOSTorAccepton content negotiation, and check whether the error body leaks paths. A positive result is any error response that reveals server-side structure.
Timeline
| Time | Event |
|---|---|
| Wed, May 22, 2019 at 4:08 PM | Bug reported |
| Thu, May 23, 2019 at 11:20 PM | Mamba security team replied "Valid Issue" |
| Thu, May 23, 2019 at 11:33 PM | Bug patched and bounty rewarded |
| Sat, May 25, 2019 at 10:20 AM | Request for public disclosure |
| Sat, May 25, 2019 at 05:20 PM | Agreed to public disclosure |
What happened, in plain words
A security researcher was looking for bugs in a company's public bug bounty programme. A bug bounty programme is a deal a company offers: if you find a security problem in their systems and report it privately, they pay you a reward (the bounty) instead of getting angry. Mamba runs one of these programmes, and the researcher chose it because its scope was wide. Scope means the list of websites and services you are allowed to test.
The researcher started with reconnaissance: the work of mapping out what a company owns on the internet before touching anything. Think of it like walking around a building and noting every door before trying any handles. One of the doors found this way was https://bot.mamba.ru, a small site where a visitor can chat with a bot. A bot is just an automated program that replies to messages, like a very simple chat partner.
The plan was to poke at that chat and see whether the message box could be abused. Two attempts failed. Then, by accident, the researcher deleted the Host header from the intercepted request and forwarded it. The server replied with an error message that contained a file path from inside the server. That path is information the public should never see, and Mamba paid 200.00 USD for the report.
Background you need first
What a request is
Every time you load a page or send a chat message, your browser sends a small text message to a server. That text message is called an HTTP request. It has three parts:
- A first line saying what you want, for example
GET /page(give me this page) orPOST /chat(here is some data for you). - A block of headers: one line per label, each label paired with a value. Headers are the envelope information, not the letter itself. They say things like which website you meant to reach, what browser you use, and what kind of data you are sending.
- Optionally, a body: the actual content, such as the text of your chat message.
A useful comparison is posting a letter. The body is the letter inside. The headers are everything written on the envelope: the address, the return address, the postmark. The server reads the envelope first to decide where the letter should go.
The Host header
One header matters more than all the others for this story: Host. It holds the name of the website you are trying to reach, for example bot.mamba.ru. It exists because one physical server can host many websites. The server looks at Host and thinks: this request is for the bot site, so I will hand it to the bot application. Without that label, the server does not know which of its many sites you meant.
Because Host is so important, the rules of HTTP say a request that lacks it should be refused outright with a 400 Bad Request error. A 400 is the server saying: your request was malformed, I cannot even begin to process it.
Status codes
Servers answer with a three-digit number. The first digit groups the meaning:
2xxmeans success.3xxmeans go somewhere else.4xxmeans you (the client) did something wrong.5xxmeans the server itself broke.
400 is a client mistake: bad request. 401 means unauthorised: the server understood the request but says you are not allowed. The difference matters here, because a 401 means the request travelled further into the application than a 400 would have.
What an intercepting proxy is
A proxy is a program that sits between your browser and the server, like a postal worker who opens every letter, reads it, and can rewrite it before sending it on. Security testers use an intercepting proxy so they can pause a request, change a header, delete a header, or alter the body, then let it continue. Without a proxy you can only use the browser as designed; with one you can send requests no browser would ever send.
The vulnerability classes
Two labels apply to what was found:
- Information disclosure: the server reveals something it should keep private, here an internal file path.
- Internal path disclosure: a narrower form of the same thing, where the leaked detail is a location on the server's disk, such as
/var/www/something/.... Knowing the layout of a server's files helps an attacker plan later attacks, a bit like learning the floor plan of a building before breaking in.
The target feature
https://bot.mamba.ru hosts a chat with a bot. You type a message, press send, and the page sends a request to the server carrying your text. That request is the one the researcher captured and edited.
Setting up
The report describes no accounts, no logins and no special roles. The report does not describe the tools used beyond intercepting the chat request.
Finding it
After about an hour of looking through subdomains, the researcher settled on https://bot.mamba.ru, which looked like a dummy bot chat site. A subdomain is a name that sits under the main domain: if mamba.ru is the building, subdomains are the named rooms inside it. The plan was to interact with the chat and look for places where input might be mishandled.
- Send a message to the bot and intercept the resulting request in the proxy. Why: to get a copy of a real request you can edit freely.
- Try XSS payloads in the message. XSS, cross-site scripting, means sneaking code into a page so that it runs in another visitor's browser. Nothing happened.
- Try host header injection on the same request. That means putting a different value into the
Hostheader to see whether the server trusts it blindly. Again nothing. - Accidentally delete the
Hostheader from the request and forward it. Why this step: it was a mistake, but it turned out to be the one request the server mishandled.
The last step produced the result. The server answered with a 401 error whose body contained a source code path from the server, which the researcher describes as a server-side misconfiguration. A misconfiguration is a setting left wrong, like a door that should be locked but was installed without a lock. The expectation for a request with no Host header is a 400 Bad Request; the server instead returned 401 together with sensitive information. The path in the published screenshot is masked.

Exploitation
Step 1: capture the bot chat request
Send a message to the bot on https://bot.mamba.ru with the proxy intercepting, so the request can be edited before it reaches the server. Why: you cannot delete a header from a normal browser, so you need the proxy to hold the request still while you change it.
Step 2: test injection points
Attempt XSS through the message content, then attempt host header injection by modifying the Host header. Neither produced a result. Why try both: the message box is the obvious place a chat feature might mishandle input, and the Host header is the obvious place a multi-site server might mishandle routing. Both are common weak spots, so they are worth a quick check before moving on.
Step 3: remove the Host header
Delete the Host header from the captured request entirely and forward it. The server responded with a 401 status and an error body that disclosed a server-side source code path. The researcher notes that a correctly configured server would have returned 400 Bad Request for this request. Why this matters: the wrong status code is the clue. A 400 would mean the request was stopped at the front door. A 401 means it was let inside and only then refused, and the refusal came with a map of the building attached.

Root cause
The report attributes the leak to a server-side misconfiguration but does not describe the mechanism. A virtual host is one website among several sharing a single server. The exact component that generated the error is not identified in the report. Parsing is the very first step, where the server reads the raw text of the request and checks it is well formed.
Impact
The disclosure was a source code path in an error response returned when the Host header was removed. Unauthenticated means no login is needed: anyone on the internet could trigger it. The researcher masked the path in the published screenshot. The report does not describe any further use of the leaked path, such as reading files or reaching other endpoints, so the practical impact is information disclosure that helps an attacker map the server's layout. Mamba's security team classified it as a valid issue and paid a bounty of 200.00 USD.
Fix
The general fix implied by the researcher's expectation is to reject requests that lack a valid Host header with 400 Bad Request before they reach the application, and to stop returning internal paths in error responses. In plain terms: close the door at the front, and stop printing the floor plan on the rejection slip.
Variants to test
These are follow-up ideas in the same spirit, for anyone who wants to look for similar mistakes:
- Send requests with no
Hostheader to other subdomains of the same programme and look for error bodies containing filesystem paths, stack traces or framework names. A stack trace is the internal list of function calls a program was in when it crashed, and it often names files. A positive result is a4xxor5xxresponse whose body includes an absolute path or internal identifier. - Send a malformed
Hostheader, such as an empty value or a duplicated header, and compare the response with the no-header case. A positive result is a different error body from the baseline, especially one that names an internal component. - Repeat the same test on HTTP/1.0 requests, where the
Hostheader is optional, and on requests routed through a proxy that may strip it. A positive result is the same path disclosure appearing through a different entry point. - Test other headers whose absence can trigger verbose errors, such as
Content-Lengthon aPOSTorAccepton content negotiation, and check whether the error body leaks paths.Content-Lengthsays how big the body is;Acceptsays what kind of answer you can handle. A positive result is any error response that reveals server-side structure.
Timeline
| Time | Event |
|---|---|
| Wed, May 22, 2019 at 4:08 PM | Bug reported |
| Thu, May 23, 2019 at 11:20 PM | Mamba security team replied "Valid Issue" |
| Thu, May 23, 2019 at 11:33 PM | Bug patched and bounty rewarded |
| Sat, May 25, 2019 at 10:20 AM | Request for public disclosure |
| Sat, May 25, 2019 at 05:20 PM | Agreed to public disclosure |
Glossary
- Bug bounty programme: a company's offer to pay researchers who privately report security problems in its systems.
- Scope: the list of systems a programme allows you to test.
- Reconnaissance: mapping out a target's websites and services before testing them.
- Subdomain: a name under a main domain, such as
bot.mamba.ruundermamba.ru. - Bot: an automated program that replies to messages or performs tasks without a human.
- HTTP request: the text message a browser sends to a server to ask for something or submit data.
- Header: a label and value in a request or response that carries envelope information, not the content itself.
- Host header: the header that names which website the request is for, used when one server hosts several sites.
- Status code: the three-digit number a server returns to say how the request went.
- 400 Bad Request: the server saying the request was malformed and was not processed.
- 401 Unauthorised: the server saying the request was understood but access is refused.
- Intercepting proxy: a tool that sits between browser and server, letting you read and edit requests before they are forwarded.
- XSS (cross-site scripting): injecting code into a page so it runs in another visitor's browser.
- Host header injection: putting a manipulated value into the
Hostheader to see whether the server trusts it. - Information disclosure: a server revealing data it should keep private.
- Internal path disclosure: a leak of a file location on the server's disk.
- Misconfiguration: a setting left wrong, leaving a system weaker than intended.
- Virtual host: one website among several that share a single physical server.
- Parsing: the first stage where a server reads the raw request text and checks it is well formed.
- Unauthenticated: reachable without logging in.
- Stack trace: an internal list of program calls, often naming files, shown when software fails.
- Content-Length: a header stating the size of the request or response body.
- Accept: a header stating what kind of response the client can handle.
- Public disclosure: making the details of a fixed bug available to everyone.