Skip to main content
ContentHigh PriorityPro

Private IP Disclosure

Updated November 2026·SecScanner Team

Private IP disclosure occurs when internal network addresses leak through HTTP headers or page content, revealing infrastructure details.

Results in 1–3 minutes · Free · No signup required

Why It Matters

Internal IP addresses help attackers map your network topology, identify targets for lateral movement, and craft more targeted attacks against your infrastructure.

How We Check

We scan response headers and body content for RFC 1918 private IP addresses (10.x.x.x, 172.16-31.x.x, 192.168.x.x), loopback addresses, and cloud internal hostnames.

Good vs Bad Values

Good and bad values for Private IP Disclosure
ValueVerdictWhy
No private address in headers or the first 200 KB of HTMLGoodThe check passes. Public addresses are not reported.
192.168.1.1, 10.0.0.1 or 127.0.0.1 in a documentation exampleGoodThese well-known example addresses are on an ignore list, and so are 255.255.x.x masks.
X-Backend-Server: 10.0.3.12BadA proxy header names the machine behind the load balancer. Strip it at the edge.
Via: 1.1 172.16.4.9 (squid)BadThe Via header lists every hop. A private address here maps part of your network.
X-Forwarded-For: 192.168.50.7 in a responseBadThat header belongs on requests. In a response it usually means a misconfigured proxy echoes it back.
http://10.1.2.3:8080/api in an inline script or JSONBadA hard-coded internal API URL, often left from development. It also breaks for real users.
ip-10-0-4-21.ec2.internal in an error messageBadAn AWS internal hostname encodes the private address and confirms the cloud provider.
Cookie BIGipServerpool=…WeakNot scanned by this check, but the F5 BIG-IP persistence cookie encodes the pool member's address and port in a reversible form.

How to Fix

Configure reverse proxies to strip internal headers (X-Forwarded-For, X-Real-IP). Review application code to ensure internal IPs are not included in error messages or debug output.

Nginx (as the reverse proxy) — hide headers that come from the backend and do not add your own:

proxy_hide_header X-Backend-Server;
proxy_hide_header X-Real-IP;
proxy_hide_header X-Originating-IP;
proxy_hide_header Via;
proxy_hide_header X-Served-By;

Apache:

ProxyVia Off
Header unset X-Backend-Server
Header unset X-Real-IP
Header unset X-Originating-IP
Header unset X-Served-By

HAProxy:

http-response del-header X-Backend-Server
http-response del-header X-Served-By
http-response del-header Via

Application code — never put the server address in a response. Search for it:

grep -rEn '\b(10\.[0-9]+|192\.168|172\.(1[6-9]|2[0-9]|3[01]))\.[0-9]+\.[0-9]+' src/ public/ templates/

Replace hard-coded addresses with environment variables resolved on the server side, and make API clients use the public hostname. In Next.js, anything in a NEXT_PUBLIC_ variable is copied into the browser bundle, so keep internal service URLs in server-only variables. Return a generic message from error handlers and keep the detail in logs.

Verify headers and body from outside your network:

curl -sI https://example.com/ | grep -Ei 'via|x-forwarded|x-real|x-backend|x-served'
curl -s https://example.com/ | grep -Eo '\b(10|192\.168|172\.(1[6-9]|2[0-9]|3[01]))(\.[0-9]+){2,3}\b' | sort -u

Common Mistakes

  • Returning the server's own address in a diagnostic endpoint such as /health or /status, then leaving that endpoint public.
  • Fixing the web server but not the error page. A framework's debug template often prints the machine address.
  • Embedding the staging API URL in a build and shipping it. The page then contains a private address in a script or config blob.
  • Forgetting that the check also reads headers set by a CDN or WAF. Review what the edge adds, not only what your application sends.
  • Treating a 10.x address as harmless because it cannot be reached directly. It tells an attacker about subnet layout once they get a foothold, and it can help bypass an IP allowlist.

Frequently Asked Questions

What is Private IP Disclosure?

Private IP disclosure occurs when internal network addresses leak through HTTP headers or page content, revealing infrastructure details.

Why does Private IP Disclosure matter for website security?

Internal IP addresses help attackers map your network topology, identify targets for lateral movement, and craft more targeted attacks against your infrastructure.

How do I fix Private IP Disclosure issues?

Configure reverse proxies to strip internal headers (X-Forwarded-For, X-Real-IP). Review application code to ensure internal IPs are not included in error messages or debug output.

Related Security Checks

Check Your Website Now

Run a free security scan to check for Private IP Disclosure issues and 61 other security checks.

Scan Your Website Free