# Cache poisoning

> What is cache poisoning, what techniques do attackers use, and how to stop it with request cleanup, Bot Management, WAF, and closed origin.

![ícono nube](https://www.transparentedge.eu/wp-content/uploads/2026/01/Frame_hosting.svg)

# # How to protect your origin behind the CDN

Your website serves almost everything you publish from the cache. Pages, images, and product listings come from the CDN edge, and the origin is barely involved. Until someone starts experimenting: adding nonexistent parameters to the URL, requesting translations your website doesn’t have, or sending headers your server doesn’t expect.

Each test looks for a variation of the request that the cache doesn’t recognize. If it finds one, it can reach the origin as many times as it wants or, worse, trick the cache into storing a manipulated response and serving it to your users. That’s cache poisoning. In this case, we explain how we stop it with [Perimetrical](https://www.transparentedge.eu/en/perimetrical/) and by protecting your origin behind a CDN.

[Talk to an expert](https://www.transparentedge.eu/en/contact/)

## **Use** case

### The vulnerability

What a cache stores, and for whom, depends on its rules. If it considers everything that arrives in the request, each variation is a new input and a trip to the origin. If it ignores something that the origin does use to construct the response, that difference can be exploited to poison it. The challenge is to protect the origin from all attempts to bypass or manipulate the cache.

These are some of the most common ones:

- **Random parameters.** */news?x=8f3a*, */news?x=91bc*… Each new value is a cache miss and a request to the origin.
- **Tracking parameters.** UTMs and other parameters that do not change the content fragment the cache and are used to try to poison it.
- **Parameters with malicious payload.** Direct attacks against the application are tested: a request like *?id=1′ OR ‘1’=’1* looks for an SQL injection if it reaches the origin.
- **Uncontrolled headers.** If the origin uses a header like *X-Forwarded-Host* to construct links and the cache doesn’t take it into account, an attacker can cause a response to be saved with their domain and served to everyone.
- **Unavailable languages.** In portals like SharePoint or Liferay, an attacker can request untranslated language paths to force the origin to respond and study its behavior.
- **Unnecessary cookies.** If the origin returns a static resource with a *Set-Cookie* header, that response is not cached and each request terminates at the origin.
- **Volume from few IPs.** With a few machines, an attacker automates thousands of variations in a short time.

And if the origin accepts direct connections, whoever discovers its IP doesn’t need any of these techniques: they bypass the entire cache.

### Transparent Edge’s response

Our goal is to deliver content from the cache, at the edge, as close to the user as possible. When a request doesn’t find what it’s looking for, it goes through successive filters, sanitization processes, and detection steps before reaching the origin. Only then does it find the content.

That’s why we place the origin behind the CDN. Only Transparent Edge communicates with it, and everything it receives passes through several layers first. At the entrance, there’s the [Anti-DDoS](https://www.transparentedge.eu/en/anti-ddos/) protection included in all our plans. Then, **the request is cleaned at the edge** and [Bot Management](https://www.transparentedge.eu/en/edge-security-en/bot-mitigation/) is used before the cache is checked. Anything not in the cache also goes through the [WAF](https://www.transparentedge.eu/en/edge-security-en/waf/) before reaching the origin. Perimetrical’s [Anomaly Detection](https://www.transparentedge.eu/en/anomaly-detection/) is comprehensive and monitors the entire system. A sudden drop in the hit ratio could be a sign that someone is testing variations to poison the cache.

Since every website is different, during onboarding, our engineers review the backends and architecture with your team and recommend which parameters, headers, languages, and cookies to monitor. The configuration is decided collaboratively, and your team retains control of its infrastructure.

### Deployment of the protection strategy

This is what we deployed, following the path of a request:

- **Anti-DDoS and rate limiting.** They stop volumetric attacks and bursts of requests from few IPs at the origin.
- **Query string cleanup.** At the edge, before querying the cache, parameters that are not part of the site’s business model, those that fragment the cache, and tracking parameters, such as UTM parameters that do not conform to the allowed pattern, are removed. The remaining parameters are sorted so that each page has only one cached entry, preventing fragmentation.
- **Allowed languages.** Existing translations are declared. Requests for any other language are redirected to the default language or rejected.
- **Headers under control.** The headers are normalized and the Vary header is adjusted so that the cache only distinguishes versions by defined criteria.
- **Cookies and redirects.** *Set-Cookie* headers, which the origin unnecessarily adds to static resources, are removed so they can be cached. Redirects are resolved at the edge, without reaching the origin.
- **Bot Management.** Before querying the cache, it identifies evasive bots by their IP reputation and by their use of VPNs, TOR, or anonymous proxies.
- **WAF.** Anything not cached goes through the WAF. It inspects URLs, parameters, headers, cookies, and JSON body, and blocks SQL injection, XSS, and repeated attempts using rules.
- **Origin behind the CDN.** The origin firewall only supports Transparent Edge IP ranges. This can be enforced with a secret header or with mTLS between the client and the edge.

### Two add-ons:API Padlock and HTTP Tunnels

Two tools strengthen the prevention of cache poisoning and parameter attacks.

### API Padlock

It encrypts the content of every API call, from the browser to the Transparent Edge platform, using AES-256. An attacker cannot see the endpoints or the actual parameters, so they don’t know what to modify. Since the request is encrypted, it cannot be manipulated. A captured request is also useless: the anti-replay protection detects and blocks it.

### HTTP Tunnels 

A lightweight connector opens an outbound-only connection, encrypted with [post-quantum cryptography](https://www.transparentedge.eu/en/blog/what-is-post-quantum-cryptography-and-what-do-i-need-to-know/), to the Transparent Edge platform. The origin is no longer exposed, and the attack surface is minimized. The only way to reach it is through the cache and Perimetrical layers, so an attacker cannot connect directly to bypass the cleaning of parameters, headers, and cookies.

Our actions produce results

Content is delivered from the cache at the edge. With clean URLs, each page has only one cached entry, the hit rate increases, and variations invented by an attacker no longer cause cache failures. This reduces the chances of a manipulated response being saved and served to other users.

Requests that do need to go to the origin arrive filtered, sanitized, and only from Transparent Edge. Your team sees in the dashboard what has been blocked at each layer and adjusts the rules when the site changes.

Recommendations for your website

If your situation resembles this, start by reviewing your own website:

- Check if your origin accepts connections from any IP address. If so, restrict it to the ranges covered by your CDN.
- Review which URL parameters are part of your business. The rest can be removed before reaching the cache.
- Make a list of the languages ​​you have translated and the cookies your application requires.
- Check if static resources are being served with *Set-Cookie*.
- Review which request headers your origin reflects in its responses.
- Look in your logs for numerous requests from a few IP addresses or URLs with parameters you don’t recognize.

![Equipo](https://www.transparentedge.eu/wp-content/uploads/2025/08/TE_aqua_icono_49_3x-150x150.png)

What can Transparent Edge do?

We’ll guide you with our team’s expertise to review how traffic reaches your source and configure each layer of Perimetrical, with recommendations tailored to your architecture and business.

[Talk to an expert](https://www.transparentedge.eu/en/contact/)


---

Source: https://www.transparentedge.eu/en/solutions/use-cases/cache-poisoning/
Updated: 2026-11-19
