Skip to content
Access control Disclosed report Beginner

IP restriction bypass via X-Forwarded-For header

An nginx status endpoint was protected by an IP-based restriction that returned 403, but adding an X-Forwarded-For header claiming a local address bypassed the restriction and returned the page content. An attacker could view information the company intended to keep hidden.

mrityushell Follow

Originally disclosed on HackerOne

Bounty$250 Low View original
  • Triaged in 11 days
  • Fixed in 7 months
  • Paid in 13 days
  • Disclosed after 3.5 years

#Hello Team, Hope you all are well.

So, I have found a 403 bypass on nginx_status/, this endpoint doesn't give that much info but it had 403, so I was able to bypass to see 200 and see the content.

#Steps To Reproduce:

  1. First try to access https://branded-us4-cloud.acronis.com/nginx_status/, you'll see 403
  2. Now add a header, X-Forwarded-For: 127.0.0.1:80, you'll see 200 response code and you'll see the content

Impact

Information Disclosure that the company doesn't want to reveal.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The researcher (mrityushell) was looking at an nginx_status/ path on an Acronis host. The endpoint itself does not expose much, but it was returning 403 Forbidden. Adding a single request header changed the response to 200 OK and returned the page content.

The reproduction is short and consists of two steps.

  1. Request the status path directly and observe the 403:

  2. Repeat the request with an X-Forwarded-For header set to a loopback address and port, and observe the 200 and the content:

The report was filed as a low severity issue under the Forced Browsing weakness, with a bounty of 250.00 USD, and was disclosed on 2024-12-05. The report does not describe a fix.

Root cause

The report does not state the cause. When the header carries a loopback address, the rule treats the request as coming from the local machine and allows it, instead of applying the restriction to the real connection. In other words, the restriction is enforced on a value the client controls rather than on the actual peer address.

Impact

The report frames the impact as information disclosure: content the operator did not intend to reveal becomes readable. The researcher notes that the endpoint does not give much information. The same weakness could matter more on a path that exposes sensitive data, but that is a general observation, not something shown here.

How this kind of bug works

Many deployments restrict administrative or diagnostic paths to local or trusted addresses. The check is often implemented at a reverse proxy or in application middleware by reading the client address. Proxies commonly add forwarding headers (X-Forwarded-For, X-Real-IP, Forwarded) so downstream services can see the original client. If a service reads one of these headers without verifying that the request actually arrived through a trusted proxy, any client can supply the header and choose the address the service sees.

A related failure is path normalisation: a rule that matches /nginx_status may not match /nginx_status/, /nginx_status/..;/, or an encoded variant, so the block is skipped while the backend still routes the request to the same handler. Both failures produce the same symptom: a 403 that becomes a 200 with a small change to the request.

Defences are straightforward in principle: derive the client address from the transport connection, and only honour forwarding headers when the immediate peer is a known proxy, stripping or overwriting any client-supplied values at the edge. Access control should also be enforced at the component that serves the content, not only at a layer that can be bypassed.

How to test for it

Start by mapping paths that return 403 rather than 404. A 403 means something exists and is being blocked, which makes it a candidate. Diagnostic endpoints, status pages, admin panels, and internal APIs are typical.

For each blocked path:

  1. Confirm the baseline response and record the status code, body length, and any distinguishing headers.
  2. Re-send the same request with forwarding headers set to loopback and private values, one at a time and then combined: X-Forwarded-For, X-Real-IP, X-Client-IP, Forwarded, and X-Originating-IP. Try both a bare address and an address with a port, since the report's value includes one.
  3. Try path variants of the same resource: trailing slash, double slash, dot segments, case changes, and encoded characters.
  4. Compare status code and body against the baseline. A positive result is a 200 (or a different, content-bearing response) where the baseline was 403, with body content that confirms the handler ran.

Common false positives: a generic error page returned with 200, a WAF challenge page, or a redirect that ends at a login screen. Check the body, not just the status. Also confirm the header is actually being honoured rather than the block being intermittent; repeat the baseline request to rule out caching or rate limiting.

How it is fixed

  • Enforce the restriction on the real peer address taken from the connection, not from a request header.
  • At the edge, strip or overwrite client-supplied forwarding headers, and only trust them from known proxy addresses.
  • Apply the access rule at the component that serves the content as well as at the proxy, so a bypass at one layer does not expose the handler.
  • Normalise paths before matching, and deny by default for diagnostic endpoints.

Hunting notes

These bugs hide where access control is layered: status and metrics endpoints, debug routes, internal tooling behind a proxy, and paths that return 403 while their siblings return 404. Recon signals include a proxy in front of the application, headers echoed back in responses, and inconsistent status codes for near-identical paths.

To make a report land, show the before and after clearly: the blocked request, the modified request, and the content returned. State what the content reveals and why it should not be public. If the data is thin, say so, as this report does, rather than overstating the impact.

Difficulty: beginner. The technique is a single header change against a blocked path, requiring no chained exploitation.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What happened, in plain words

A security researcher (mrityushell) was looking at a web server belonging to Acronis. On that server there is a page at the path nginx_status/. This is a status page that a web server can produce to report on itself.

When the researcher asked for that page normally, the server answered with the code 403 Forbidden. A 403 is the server saying "I know what you are asking for, but you are not allowed to have it". A 403 tells you something is there and something is blocking you.

The researcher then sent the very same request again, with one extra line added to it, and the server answered 200 OK and returned the page content. The extra line was a header called X-Forwarded-For, set to [redacted]:80. In other words, a single added line turned a refusal into a success.

The report was filed as a low severity issue under the weakness category Forced Browsing, with a bounty of 250.00 USD, and was disclosed on 2024-12-05. The report does not describe a fix.

The two steps, line by line

A request is simply the message your browser sends to a server to ask for a page. It has a first line saying what you want, then a series of header lines carrying extra details, such as which site you are asking for. The researcher wrote the requests out in their raw form.

Step 1: ask for the status page and see the refusal.

  • GET /nginx_status/ HTTP/1.1 means "give me the resource at the path /nginx_status/, using version 1.1 of the HTTP protocol". GET is the ordinary verb for fetching a page.
  • Host: branded-us4-cloud.acronis.com tells the server which site name you are asking for. One server can host many sites, so it needs to know which one you mean.

This request is what produced the 403. Recording it matters because it is the baseline: without a clear "before", you cannot show that anything changed.

Step 2: the same request, plus one header.

  • X-Forwarded-For: [redacted]:80 is the added line. X-Forwarded-For is a header that proxies use to pass along the address of the original client. A proxy is a server that sits in front of another server and forwards traffic to it, like a receptionist who takes your message to the right desk. Because the receiving server only sees the proxy, the proxy adds this header so the real visitor's address is not lost.
  • [redacted] is the loopback address, the address a machine uses to refer to itself. :80 is a port, a numbered door on that machine; port 80 is the usual door for plain web traffic.

So the researcher sent a line the researcher fully controls, and the server returned 200 OK with the content. This step matters because it isolates the cause: nothing else changed between the two requests except that one header.

Impact

The report describes the impact as information disclosure: content the operator did not intend to reveal became readable. The researcher notes that the endpoint does not give much information. The same weakness could matter far more on a path that exposes sensitive data, but that is a general point, not something shown in this report.

In general, how this kind of bug works

Many sites restrict administrative or diagnostic pages to local or trusted addresses. The check is often made by reading the client's address. The problem is that the address can come from two very different places: the actual network connection, which a visitor cannot fake, or a header such as X-Forwarded-For, which a visitor can write freely. If the check reads the header without first confirming the request really arrived through a trusted proxy, any visitor can claim to be anyone, including the machine itself.

A related failure is path matching. A rule written for /nginx_status may not match /nginx_status/, or a variant with extra slashes or encoded characters, so the block is skipped while the server still delivers the same page. Both failures look identical from outside: a 403 that becomes a 200 after a small change to the request.

The fix is straightforward in principle. Work out the client address from the connection itself. Only honour forwarding headers when the immediate sender is a known proxy, and strip or overwrite anything a client supplied at the edge. Enforce the access rule at the component that actually serves the content, not only at a layer that can be stepped around.

In general, how to test for it

Start by looking for paths that answer 403 rather than 404. A 403 means something exists and is being blocked, which makes it a candidate. Status pages, admin panels and internal tools are typical.

For each blocked path:

  1. Record the baseline: the status code, roughly how long the page is, and any headers that stand out.
  2. Send the same request again with forwarding headers set to loopback and private addresses, one at a time and then together: X-Forwarded-For, X-Real-IP, X-Client-IP, Forwarded and X-Originating-IP. Try both a bare address and an address with a port, since the value in this report includes one.
  3. Try path variants of the same resource: a trailing slash, a double slash, dot segments, different capitalisation and encoded characters.
  4. Compare status code and body with the baseline. A positive result is a 200, or another response that carries content, where the baseline was 403, with body content proving the page actually ran.

Watch for false positives: a generic error page returned with 200, a security challenge page, or a redirect that ends at a login screen. Check the body, not just the status code. Repeat the baseline request to rule out caching or rate limiting making the block look intermittent.

In general, how it is fixed

  • Enforce the restriction on the real address taken from the connection, not from a request header.
  • At the edge, strip or overwrite client-supplied forwarding headers, and trust them only from known proxy addresses.
  • Apply the access rule where the content is served as well as at the proxy, so a bypass at one layer does not expose the page.
  • Normalise paths before matching, and deny by default for diagnostic pages.

Glossary

  • Header: an extra line in a request or response carrying details, such as the site name or the client address.
  • HTTP: the protocol browsers and servers use to exchange requests and pages.
  • GET: the HTTP verb for fetching a resource.
  • Host: the header naming which site on a server you are asking for.
  • Status code: the three-digit number a server returns, such as 200, 403 or 404.
  • 200 OK: the request succeeded and content is being returned.
  • 403 Forbidden: the server understood the request but refuses to allow it.
  • 404 Not Found: the server has nothing at that path.
  • Endpoint: a specific path on a server that does something, such as /nginx_status/.
  • nginx_status: a status page a web server can expose to report on its own activity.
  • Proxy: a server that sits in front of another and forwards traffic to it.
  • Reverse proxy: a proxy placed in front of a site's own servers to receive visitors' requests first.
  • X-Forwarded-For: a header proxies use to pass along the original client's address; a client can also write it.
  • X-Real-IP, X-Client-IP, Forwarded, X-Originating-IP: other headers used for the same purpose of carrying a client address.
  • Loopback address: [redacted], the address a machine uses to refer to itself.
  • Port: a numbered door on a machine; port 80 is the usual one for plain web traffic.
  • Path: the part of a URL after the site name, such as /nginx_status/.
  • Path normalisation: converting different spellings of the same path into one standard form before matching rules against it.
  • Information disclosure: revealing content the operator did not intend to make public.
  • Forced Browsing: reaching a page or file that is not linked publicly, by requesting its path directly.
  • Access control: the rules deciding who may reach what.
  • WAF: a web application firewall, a filter that inspects requests and blocks suspicious ones.
  • False positive: a result that looks like a finding but is not one.
  • Baseline: the recorded normal response you compare later attempts against.
  • Severity: a rating of how serious an issue is, here low.
  • Bounty: a payment made to a researcher for a valid report.

More from Acronis

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.