Apache mod_negotiation filename bruteforcing https://api.ratelimited.me
An Apache server with mod_negotiation enabled returned a pseudo directory listing when sent an invalid Accept header. An attacker could use this to enumerate base names, extensions and backup files on the server.
Originally disclosed on HackerOne
- Triaged in 8 days
- Fixed in 11 days
- Disclosed after 4.6 years
mod_negotiation is an Apache module responsible for selecting the document that best matches the clients capabilities, from one of several available documents. If the client provides an invalid Accept header, the server will respond with a 406 Not Acceptable error containing a pseudo directory listing. This behaviour can help an attacker to learn more about his target, for example, generate a list of base names, generate a list of interesting extensions, look for backup files and so on. This vulnerability affects Web Server.
POC:
GET /index HTTP/1.1
Host: api.ratelimited.me
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: codeslayer137
Accept-Language: id,en-US;q=0.7,en;q=0.3
Connection: close
Cookie: __cfduid=d1223d3114b0d6a19cb09dbdbf358c2721544548659; fs_uid=rs.fullstory.comHCE075666823336886272:5639274879778816; PHPSESSID=iipu5birnh9jap713248e5vlb7; _ga=GA1.2.1698835729.1546721836; _gid=GA1.2.1401928030.1546721836; mp_9e50b60442d3361880f79100f15e5aac_mixpanel=%7B%22distinct_id%22%3A%20%221681fc8d6fc1ee-00a6f91171d9d8-12666d4a-e1000-1681fc8d6fd2cc%22%2C%22%24device_id%22%3A%20%221681fc8d6fc1ee-00a6f91171d9d8-12666d4a-e1000-1681fc8d6fd2cc%22%2C%22%24initial_referrer%22%3A%20%22%24direct%22%2C%22%24initial_referring_domain%22%3A%20%22%24direct%22%7D
Upgrade-Insecure-Requests: 1
Impact
Possible information disclosure: directory listing, filename bruteforcing, backup files. How to fix this vulnerability Disable the MultiViews directive from Apache's configuration file and restart Apache.
Attachments

Context
Apache's mod_negotiation module selects the document that best matches the client's capabilities from one of several available documents. When a client sends an Accept header the server cannot satisfy, Apache responds with 406 Not Acceptable, and in the configuration described here that error page contains a pseudo directory listing. That listing is the whole issue: it exposes the base names of files the server considered while negotiating, which an attacker can use to learn about the target.
The target in this report is api.ratelimited.me, part of the RATELIMITED program on HackerOne, with the wildcard asset *.ratelimited.me. The report is rated low severity and was disclosed on 1 August 2023.
Setup
No accounts, roles or special tooling are described. The only precondition is that the server runs Apache with mod_negotiation enabled and the MultiViews directive active, which is what makes the negotiation behaviour reachable. The proof of concept is a single HTTP request sent with an ordinary browser user agent.
Finding it
The researcher knew the documented behaviour of mod_negotiation: if the client provides an invalid Accept header, the server answers with a 406 Not Acceptable error that includes a pseudo directory listing. That listing can help an attacker learn more about the target, for example by generating a list of base names, generating a list of interesting extensions, or looking for backup files. The researcher tested whether api.ratelimited.me behaved this way.
Exploitation
Step 1: Send a request with an invalid Accept header
The proof of concept is a GET for /index with an Accept value that is not a valid media type:
GET /index HTTP/1.1
Host: api.ratelimited.me
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: codeslayer137
Accept-Language: id,en-US;q=0.7,en;q=0.3
Connection: close
Cookie: __cfduid=[redacted]; fs_uid=[redacted]; PHPSESSID=[redacted]; _ga=[redacted]; _gid=[redacted]; [redacted]=[redacted]
Upgrade-Insecure-Requests: 1
The important part is Accept: codeslayer137. A media type has the form type/subtype, so this value cannot be parsed as one, and the negotiation logic has nothing valid to match against. The request targets /index, a base name without an extension, which is exactly the kind of path MultiViews handles by searching for candidate files. The remaining headers are ordinary browser headers and a set of cookies captured from a browsing session; they are not part of the technique.
Step 2: Read the 406 response
Because no document matches the invalid Accept header, the server returns 406 Not Acceptable, and the error body contains the pseudo directory listing. The report does not reproduce the response body, so the exact contents are not shown here. The attachment illustrates the result:

The listing is what turns the error into an information leak: it reveals the names the server considered during negotiation, which the attacker would otherwise have to guess.
Root cause
With MultiViews enabled, mod_negotiation performs its own lookup for a request path such as /index, gathering the available variants that could satisfy the request. When the client's Accept header is invalid, no variant can be selected, and the resulting 406 error includes a pseudo directory listing of those candidates. The mistake is therefore configuration rather than code: the negotiation feature is exposed on a path where its error output discloses file names. The report does not describe any additional defence that was in place.
Impact
The report describes the impact as possible information disclosure: directory listing, filename bruteforcing and discovery of backup files. In practical terms, an attacker can use the listing to enumerate base names, infer interesting extensions, and look for backup files, all of which feed further attacks. The report frames this as helping an attacker learn more about the target rather than as direct compromise, and the low severity rating reflects that.
Fix
The recommended fix is to disable the MultiViews directive in Apache's configuration file and restart Apache. That removes the negotiation behaviour that produces the pseudo listing on the 406 error.
Variants to test
- Request a base name without an extension, such as
/index, with anAcceptheader that is not a valid media type. A positive result is a406 Not Acceptablewhose body lists candidate file names. - Try other extensionless paths that map to real content on the host. A positive result is the same pseudo listing revealing names you did not supply.
- Compare the listing against known backup naming conventions to see whether backup files appear among the candidates. A positive result is a backup file name disclosed in the error body.
Hunting notes
This bug hides wherever Apache serves content with MultiViews enabled, particularly on hosts that map extensionless paths to files. During recon, the signal is an Apache front end combined with URLs that resolve without an extension; sending an invalid Accept value to such a path is a cheap check. The report does not reproduce the response body; the attachment is the only evidence shown.
What happened, in plain words
A website called api.ratelimited.me runs on a web server program called Apache. Apache has an optional feature that lets it pick the "best" file to send back when a visitor asks for a page without saying exactly which file they want. When that feature is switched on and a visitor sends a request the server cannot match to any file, Apache replies with an error page. On this particular server, that error page accidentally included a list of file names the server had been considering. Anyone who could trigger the error could read those names, which is information the site owner did not mean to share.
The researcher who found this sent one specially crafted request to the site and reported the behaviour. The report is rated low severity, which means the problem is real but does not by itself let someone break into the site. It was disclosed publicly on 1 August 2023.
To follow the rest of this article you only need to know what a browser does: it asks a web server for a page, and the server sends one back. Everything below builds on that.
Background: the pieces involved
Before looking at the request, here are the concepts the report relies on, explained from scratch.
What a web server and Apache are
A web server is the program on a computer that waits for requests from browsers and answers them. When you type an address into your browser, the browser sends a request to a web server somewhere, and the server sends back the page, an image, or an error message. Apache is one of the most widely used web server programs in the world. It is not a website itself; it is the software many websites run on.
What a module is
Apache is built from a core plus optional add-on pieces called modules. Each module adds a feature. You can think of it like a phone with apps: the phone works without them, but each app adds something specific. mod_negotiation is one such module, and it is the one at the centre of this report.
What mod_negotiation and MultiViews do
mod_negotiation is the Apache module responsible for selecting the document that best matches the client's capabilities, from one of several available documents. In plain terms: a server might hold the same content in several forms, for example a page in different languages or in different file formats. When a browser asks for that content, the module looks at what the browser says it can handle and picks the most suitable file.
MultiViews is a setting that switches this behaviour on for a directory. With MultiViews active, a request for a name without a file extension, such as /index, makes Apache search for files whose names start with index and choose among them. This is why the request in this report targets /index rather than a full file name like /index.html.
What an HTTP request and its headers are
When your browser asks for a page, it sends a short text message called an HTTP request. The first line says what it wants (the method, such as GET, and the path). The lines after it are called headers: small labelled pieces of information. Some headers tell the server what kind of content the browser can accept, some identify the browser, and some carry stored data. The server reads these headers and decides what to send back.
What the Accept header is
One of those headers is Accept. It is how the browser tells the server which content types it is willing to receive. A content type (also called a media type) has the form type/subtype, for example text/html for a web page or image/png for an image. The browser lists the types it can handle, and the server is supposed to pick one of them.
What a 406 Not Acceptable error is
Every response from a web server starts with a three-digit status code. 200 means success, 404 means the page was not found, and 406 Not Acceptable means the server could not produce anything matching what the browser said it would accept. It is the server saying: you asked for content in a form I cannot give you.
What a directory listing is, and what a pseudo directory listing is
A directory listing is a page that shows the files in a folder, like opening a drawer and seeing everything inside labelled. Normally a web server does not show one, because it would reveal the site's internal structure. A pseudo directory listing is similar in appearance but is not a real folder view: it is a list of candidate file names that the server generated while trying to work out which file to send. It still leaks names, which is the problem here.
What an API is
An API (application programming interface) is a way for one piece of software to talk to another. A web API is a set of addresses on a server that programs, rather than people, are meant to call. The host name in this report, api.ratelimited.me, suggests the site is an API endpoint, though the report itself does not describe what the API does.
What a cookie is
A cookie is a small piece of data that a website stores in your browser and that your browser sends back with later requests. Cookies are how sites remember that you are logged in, or track preferences. They are not secret in the way a password is, but they can identify a session, so they should not be shared publicly. The request in this report contains several cookies captured from a browsing session; they are not part of the technique and are redacted here.
What information disclosure means
Information disclosure is a vulnerability class where a system reveals data to someone who should not have it. It does not necessarily mean the attacker can change anything or log in; it means they learn something they were not meant to know. File names, internal paths and version numbers are typical examples. The report classifies this issue as possible information disclosure.
The target
The target is api.ratelimited.me, part of the RATELIMITED program on the bug bounty platform HackerOne. The program's scope covers the wildcard asset *.ratelimited.me, meaning any host under that domain. The report is rated low severity and was disclosed on 1 August 2023.
Setup
The report describes no accounts, roles or special tools. The only precondition is that the server runs Apache with mod_negotiation enabled and the MultiViews directive active, because that is what makes the negotiation behaviour reachable at all. The proof of concept is a single HTTP request, sent with an ordinary browser user agent.
Finding it
The researcher already knew the documented behaviour of mod_negotiation: if the client provides an invalid Accept header, the server answers with a 406 Not Acceptable error that includes a pseudo directory listing. That listing can help an attacker learn more about the target, for example by generating a list of base names, generating a list of interesting extensions, or looking for backup files. The researcher then tested whether api.ratelimited.me behaved this way.
Why this approach makes sense: the researcher is not guessing blindly. The module's behaviour is documented, so the test is a check of whether a known misconfiguration exists on this host. If the server answers with the listing, the answer is yes.
Exploitation
Step 1: Send a request with an invalid Accept header
The proof of concept is a GET request for /index with an Accept value that is not a valid media type:
GET /index HTTP/1.1
Host: api.ratelimited.me
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: codeslayer137
Accept-Language: id,en-US;q=0.7,en;q=0.3
Connection: close
Cookie: __cfduid=[redacted]; fs_uid=[redacted]; PHPSESSID=[redacted]; _ga=[redacted]; _gid=[redacted]; [redacted]=[redacted]
Upgrade-Insecure-Requests: 1
Line by line, in plain words:
GET /index HTTP/1.1is the request line.GETis the method used to ask for something./indexis the path being requested, a base name with no file extension.HTTP/1.1is the version of the request protocol.Host: api.ratelimited.metells the server which site the request is for. One server can host many sites, so this header says which one is meant.User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0identifies the browser. Here it is an ordinary Firefox string, so the request looks like normal browser traffic.Accept: codeslayer137is the key line. A media type must look liketype/subtype, andcodeslayer137has no slash and no valid type, so it cannot be parsed as one. The negotiation logic therefore has nothing valid to match against.Accept-Language: id,en-US;q=0.7,en;q=0.3lists the languages the browser prefers, with quality values (q=) ranking them. It is a normal browser header.Connection: closeasks the server to close the connection after the response instead of keeping it open.Cookie: ...carries stored session data from a browsing session. These values are redacted here because they can identify a session. They play no part in the technique.Upgrade-Insecure-Requests: 1is a standard browser header indicating the browser would prefer a secure (HTTPS) version of the page if available.
The request targets /index, a base name without an extension, which is exactly the kind of path MultiViews handles by searching for candidate files. The remaining headers are ordinary browser headers and a set of cookies captured from a browsing session; they are not part of the technique.
Step 2: Read the 406 response
Because no document matches the invalid Accept header, the server returns 406 Not Acceptable, and the error body contains the pseudo directory listing. The report does not reproduce the response body, so the exact contents are not shown here. The attachment illustrates the result:

The listing is what turns the error into an information leak: it reveals the names the server considered during negotiation, which the attacker would otherwise have to guess. In everyday terms, it is like asking a shop assistant for an item they do not stock and having them read out the full stock list instead of just saying no.
Root cause
With MultiViews enabled, mod_negotiation performs its own lookup for a request path such as /index, gathering the available variants that could satisfy the request. When the client's Accept header is invalid, no variant can be selected, and the resulting 406 error includes a pseudo directory listing of those candidates. The mistake is therefore configuration rather than code: the negotiation feature is exposed on a path where its error output discloses file names. The report does not describe any additional defence that was in place.
Impact
The report describes the impact as possible information disclosure: directory listing, filename bruteforcing and discovery of backup files. In practical terms, an attacker can use the listing to enumerate base names, infer interesting extensions, and look for backup files, all of which feed further attacks. The report frames this as helping an attacker learn more about the target rather than as direct compromise, and the low severity rating reflects that.
Why file names matter: knowing that a file called config or backup exists on a server gives an attacker a specific target to try next. It is the difference between searching a whole building and being handed a floor plan.
Fix
The recommended fix is to disable the MultiViews directive in Apache's configuration file and restart Apache. That removes the negotiation behaviour that produces the pseudo listing on the 406 error.
Variants to test
- Request a base name without an extension, such as
/index, with anAcceptheader that is not a valid media type. A positive result is a406 Not Acceptablewhose body lists candidate file names. - Try other extensionless paths that map to real content on the host. A positive result is the same pseudo listing revealing names you did not supply.
- Compare the listing against known backup naming conventions to see whether backup files appear among the candidates. A positive result is a backup file name disclosed in the error body.
Hunting notes
This bug hides wherever Apache serves content with MultiViews enabled, particularly on hosts that map extensionless paths to files. During recon, the signal is an Apache front end combined with URLs that resolve without an extension; sending an invalid Accept value to such a path is a cheap check. The report does not reproduce the response body; the attachment is the only evidence shown.
Glossary
- Apache: a widely used web server program that answers requests from browsers.
- API: a way for one piece of software to talk to another; a web API is a set of addresses meant for programs to call.
- Base name: the part of a file name before the extension, for example
indexinindex.html. - Bug bounty program: an arrangement where a company invites researchers to report security problems, often for a reward.
- Cookie: a small piece of data stored by a website in your browser and sent back with later requests, often used to remember a session.
- Directory listing: a page that shows the files in a folder.
- Disclosure: the public release of a security report after it has been handled.
- Extension: the suffix at the end of a file name, such as
.htmlor.php, that usually indicates the file type. - GET: the HTTP method used to ask a server for a resource.
- Header: a labelled line of information in an HTTP request or response, such as
AcceptorHost. - HackerOne: a bug bounty platform where researchers and companies meet.
- HTTP: the protocol browsers and web servers use to exchange requests and responses.
- Information disclosure: a vulnerability class where a system reveals data to someone who should not have it.
- Media type (content type): a label of the form
type/subtype, such astext/html, describing the format of content. - mod_negotiation: the Apache module that selects the document best matching the client's capabilities from several available documents.
- Module: an optional add-on piece of software that extends a larger program's features.
- MultiViews: an Apache directive that enables content negotiation for extensionless paths, making the server search for candidate files.
- Pseudo directory listing: a list of candidate file names generated during negotiation, shown in an error page; it looks like a folder view but is not one.
- Recon: the information-gathering phase of a security test, before attempting any exploitation.
- Severity: a rating of how serious a vulnerability is, here low.
- Status code: the three-digit number at the start of an HTTP response, such as
200,404or406. - 406 Not Acceptable: the status code meaning the server could not produce content matching what the client said it would accept.
- User agent: the header identifying the browser or client software making a request.
- Wildcard asset: a scope entry such as
*.ratelimited.methat covers every host under a domain.