Skip to main content
LowHeadersOWASP A05:2021CWE-200

How to fix: Server-Timing header exposes internal metrics

The Server-Timing response header reveals internal performance metrics such as database query times, cache status, or backend service timings.

Why it matters

Detailed server timing data reveals internal architecture (database, cache, rendering steps), helps attackers identify slow operations for timing attacks, and provides a map of backend services being called.

Restrict Server-Timing to non-sensitive metric names and only expose it in development or to internal monitoring.

How to fix it

  1. 1In production, disable Server-Timing or use opaque metric names
  2. 2Gate Server-Timing behind an internal IP check or admin auth
  3. 3Add Timing-Allow-Origin to restrict which origins can read the timings

Code examples

Conditional Server-Timing

TypeScript
// Only add timing in development
if (process.env.NODE_ENV !== "production") {
  res.setHeader("Server-Timing", `db;dur=${dbMs}, render;dur=${renderMs}`);
}

References

Detected automatically by VulnRadar. The check id is server-timing-exposure, stable across every scan so you can filter or diff on it.

See every headers check

Questions

How severe is Server-Timing header exposes internal metrics?
VulnRadar rates this low 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 server-timing-exposure, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Server-Timing header exposes internal metrics map to?
It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.

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.

Propose a checkHow a check is built

Scan your own site for server-timing header exposes internal metrics

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Server-Timing header exposes internal metrics | VulnRadar