All DDoS Definitions
DDoS Testing Definition

Cache-Poisoned Denial of Service (CPDoS)

When one malformed request makes a cache store an error page, every visitor who asks for that URL afterwards receives the error, and the site is down for them without a single flood packet arriving. That is Cache-Poisoned Denial of Service (CPDoS): a denial-of-service attack on the caching layer, and a failure a DDoS test of any cached site should look for alongside the floods. Researchers at TH Köln described it in 2019, in the paper "Your Cache Has Fallen".

CPDoS: one bad request, one stored error, every user 1. One malformed request for /page, with an oversized header Cache accepts the request, forwards it its header limit is the larger one Cache key: /page 3. now holds the error Origin its header limit is smaller 2. rejects it: 4xx error the page itself is healthy 4. Real users, normal GET /page answered from the cache with the stored error until it expires Three disagreements between cache and origin ("Your Cache Has Fallen", TH Köln, 2019) Header Oversize (HHO) the cache accepts a larger request header than the origin will Meta Character (HMC) the cache passes a control character that the origin refuses Method Override (HMO) the origin turns a GET into another method, the cache files it as the GET Hardening: cache no errors beyond the standard's defaults, align header limits, strip override headers at the edge BlackNeuron™
Cache-Poisoned Denial of Service (CPDoS): a cache accepts a malformed request and forwards it, the origin rejects it with an error, the cache stores that error under the page's normal cache key, and every later real user asking for the page receives the stored error until it expires

How CPDoS works

A cache and the origin behind it parse the same request, and they do not always agree about it. CPDoS lives in that disagreement. The request is acceptable to the cache, so it is forwarded. The origin rejects it and answers with an error. The cache then stores the error under the URL's ordinary cache key, because nothing in the key records the part of the request that caused it.

Every later request for that URL is perfectly normal. It still gets the stored error.

The paper described three variants, each exploiting a different disagreement:

  • HTTP Header Oversize (HHO). The cache accepts larger request headers than the origin does. An oversized header passes the cache, and the origin answers with a "header too large" error.
  • HTTP Meta Character (HMC). A header carries a control character that the cache passes through and the origin refuses as malformed.
  • HTTP Method Override (HMO). The origin honours a header that turns a GET into another method, answers with an error for that method, and the cache files the result against the plain GET.

Which errors are dangerous depends on what the cache will keep. The HTTP standard lets a cache store some error responses by default, among them 404, 405, 410 and 501. Many caches can also be configured to hold other errors, server errors included, for a short time.

Why it matters under attack

A cache-busting attack switches the cache off for the attacker's own requests and sends them to the origin. CPDoS does the opposite: it keeps the cache running and turns it against real users.

The cost to the attacker is about one request per cache key, per cache location, per expiry. There is no volume, so rate limits, flow telemetry and scrubbing have nothing to react to. A CDN keeps a separate cache at each location, so a poisoned entry reaches the users served from that location, and the attacker repeats the request wherever they want the error to appear.

The same storage behaviour matters during an ordinary flood. When an origin under load starts answering with server errors, a cache set to hold those errors hands each one to every user who asks before it expires. That can shield a struggling origin from a storm of retries, which is why the setting exists. It can also keep users on an error page after the origin has recovered, so the outage outlasts the flood by up to one expiry period.

CPDoS: one malformed request, a stored error for every visitor Normal GET /page from real users One request, oversized header Origin smaller header limit 4xx error Cache entry /page The cache forwards what the origin refuses, then stores the refusal under the page key until it expires BlackNeuron™
Animation of Cache-Poisoned Denial of Service: normal GET requests pass the cache, one request with an oversized header reaches the origin, the origin rejects it with an error, and the cache entry for the page now holds that error for every later visitor

What a DDoS test checks

The first rule is safety. A test only ever probes cache keys no real user requests, such as a test-only path or parameter, so any entry it poisons is seen by the tester alone. Poisoning a shared production key to prove the point is an outage, not a test.

Within that limit, a test compares the cache and the origin directly:

  • Header limits. The largest request header each layer accepts. Where the cache accepts more than the origin, HHO is open.
  • Malformed headers. Whether the cache forwards characters the origin refuses.
  • Method overrides. Whether the origin honours override headers that the cache leaves out of its key.
  • Stored errors. Which status codes the cache keeps, and for how long, including 400-class rejections and server errors.

During a flood test, it adds one more number: how long real users keep receiving a cached error after the origin is healthy again. That tail belongs in the time to recovery the business actually sees.

Hardening follows from the same list. Do not cache errors beyond the codes the standard allows by default; keep any deliberate error caching short and written down; make the cache reject what the origin would reject, or align the two header limits; and strip method-override headers at the edge, or put them in the cache key.

A cache earns this care because of the flood load it removes from the origin on a normal day, and how much that is, and what happens when the hit ratio falls, is measured in CDN cache DDoS absorption.