Skip to content
DoS Write-up Intermediate

From Query Param to Cookie Poisoning: How WAFs Fail at Security

Marketing pixels copy click ID query parameters into long-lived first-party cookies, and WAFs that block malicious values in cookies but not query parameters then block every subsequent request. An attacker can craft a link that poisons the victim's cookie and persistently denies access to the site until the cookie is cleared.

blogwithsarthak Follow

Published on medium.com

Many websites use marketing/analytics pixels that read click IDs from landing URLs (e.g., fbclid, gclid, lifatid) and save them in first‑party cookies (fbc, gcl, LinkedIn first‑party ID). On a large number of targets, WAF policies treat values inside cookies/headers more strictly than values in query parameters.

Sarthak Saxena, on medium.com

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 the WAF applies stricter inspection to cookie values than to query parameters, while third-party marketing SDKs persist unsanitised URL parameters into long-lived cookies.

Impact

The victim is persistently denied access to the site until the poisoned cookie is manually deleted, creating a denial-of-service condition.

What the attacker needed

Victim clicks a crafted link; site uses a marketing pixel; WAF blocks the value in cookies

The fix

Developers should sanitise or whitelist tracking parameter values before persisting them to cookies, and WAF vendors should add relaxation rules for cookies created by known pixel parameters.

How it was found

  1. Craft a URL with a malicious value in a click ID parameter such as fbclid.
  2. The marketing SDK stores that value in a long-lived cookie.
  3. On reload, the browser sends the poisoned cookie in every request.
  4. The WAF detects the malicious value in the cookie header and blocks the request.

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.

Websites often use tracking tools that save a value from the URL into a cookie so they can remember where a visitor came from. A firewall (WAF) checks incoming requests and may block ones that look dangerous, but it can be stricter about cookies than about URLs. If an attacker puts a blocked-looking value in the URL, the tracking tool copies it into a cookie, and then the firewall blocks every future request from that browser, locking the user out.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.