*Parameter Cloaking in Web Cache Poisoning Using Rails Parameter Cloaking Scanner*
The cache ignores certain query parameters (like utm_content) when building its key, but the back-end still processes them. An attacker can use parameter cloaking to inject a malicious callback parameter, poisoning the cached homepage with JavaScript that executes for visitors.
Published on infosecwriteups.com
Parameter cloaking is a web cache poisoning technique that exploits discrepancies in how different components of a web application handle query parameters. In this lab scenario, the cache system ignores certain parameters (such as UTM tracking values) when generating cache keys, while the back-end application still…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a mismatch between the cache key and the parameters the back-end processes, allowing parameter cloaking via a semicolon to merge parameters.
Impact
If an attacker successfully poisons cached responses, they could deliver persistent client-side attacks such as cross-site scripting to large groups of users, potentially leading to session hijacking, credential theft, or forced redirections.
What the attacker needed
Access to the lab environment; Burp Suite with Param Miner extension
How it was found
- Open the lab environment.
- Install and enable the Param Miner extension in Burp Suite.
- Capture the homepage request and send it to Repeater.
- Run the Rails Param Cloaking Scan from Param Miner.
- Identify that the utm_content parameter is ignored by the cache but processed by the back-end.
- Craft a request using a semicolon to merge parameters and inject a malicious callback, then resend until the lab is solved.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web cache stores copies of pages to serve them faster. Here, the cache decides what to store based on some parts of the URL but ignores others, while the server still reads those ignored parts. An attacker can hide a malicious instruction in an ignored part, so the cache stores a poisoned page that runs harmful code in visitors' browsers.
What is Cache bugs?
A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.