How to fix: X-Request-Id header exposed to clients
The X-Request-Id header is returned in the response and exposes internal request tracking identifiers.
Why it matters
Internal request IDs may leak details about infrastructure, help attackers correlate requests across systems, or reveal predictable ID schemes that enable enumeration or replay attacks.
Request IDs used for internal logging can be stripped from client-facing responses.
How to fix it
- 1Remove X-Request-Id from client responses while keeping it in internal logs
- 2If needed for debugging, only return it to authenticated users
Code examples
Strip in Nginx
proxy_hide_header X-Request-Id;References
Detected automatically by VulnRadar. The check id is x-request-id-exposed, stable across every scan so you can filter or diff on it.
More headers checks
Questions
- How severe is X-Request-Id header exposed to clients?
- VulnRadar rates this info severity in the headers category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id x-request-id-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.