4

The following HTTP headers can be seen in responses on some sites:

  • Age: 12
  • Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==
  • Via: 1.1 tacoma:3128 (squid/2.7.STABLE9)
  • X-Cache: MISS from tacoma
  • X-Cache-Lookup: MISS from tacoma:3128
  • X-Content-Digest: a513fd4a793de617e370699fe9a71c08be3b9476
  • X-Forwarded-Proto: https
  • X-Rack-Cache: miss
  • X-Runtime: 0.002216
  • X-Ua-Compatible: IE=Edge,chrome=1

At first sight those HTTP headers don't leak any sensitive information or introduce security vulnerabilities and make attacker's life easier.

But will presense of those headers in HTTP responses harm security in any way?

6

They don't directly affect security.

However, it is leaking information that may be valuable to an attacker.

For instance, the attacker can use the information contained in those headers to:

  • Determine the exact version of squid running on your systems
  • Determine the application backend (X-Rack-Cache: indicates Ruby, so it's most likely Rails or Sinatra)
  • Determine internal hostnames (tacoma likely refers to the frontend squid host) and ports
  • Give hints as to the caching strategy of the page (By making multiple requests and inspecting the HTTP Age header or some of the other X- headers you can tell whether a request resulted in a cache hit or miss).

So, yes - hiding these headers is just going to obscure the goings on behind, not protect them. But you don't have to make an intruders job easy for them :)

2

The concept itself doesn't harm security, but the contents could.

If you decided to secure your site with the following HTTP header:

  • X-UserIsAdmin: true

then it would harm security.

Using HTTP headers for their intent, with information relevant to properly handling an HTTP request, by itself shouldn't harm security. Just apply the same methods you do to any other client/server communication.

2

HTTP Headers are content just like the rest of the response. Whether or not any content, headers or otherwise, is a security concern depends on the content.

0

X-Runtime header will expose which part of your website is a good target for DOS attacks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.