Cache Posioning leading to denial of service at `█████████` - Bypass fix from report #1198434
The site's cache could be poisoned by sending a request with a non-existent port in the Host header, causing a 301 redirect that reflected that port to be stored and served to other users. An attacker could repeat this on many paths to make large parts of the domain unreachable.
- Triaged in 21 hours
- Fixed in 32 days
- Disclosed after 45 days
#Vulnerability Cache Posioning (CPDoS) Cache Posioning Denial Of Service (CPDoS) [1] is taking advantage of 301 redirects by storing an false value of either domain, port or header that effect the response in any way. This makes the cache server store the false value and later delivery it to all users that view the domain page. This vulnerability is in fact an Cache poisoning [2] in the ground which makes it possible to not harm the system in any way when testing. This is because it's possible to add random URL path to the domain that make only that path exploited under x time. An attacker will use intruder to update the cache server every x sec, min or hours to make the domain down.
#Summary The vulnerability was discovered when was retesting the vulnerability and discovered that the domain still was vulnerable for cache poisoning. I did some tests and I was able to re poisoning the domains cache server again in different paths. It looks like the fix from report #1198434 only fixed one path in the domain but other paths remain vulnerable.
Proof of concept
Can be used as step by step if you like
█████████
Supported link [1] https://cpdos.org/ - "What is CPDoS?", Vulnerability explained [2] https://portswigger.net/research/responsible-denial-of-service-with-web-cache-poisoning - "Responsible denial of service with web cache poisoning", James Kettle
Best regards, Brumens
Impact
An attacker is able to crash most of the paths related to the domain.
System Host(s)
████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
WARNING! Do not send the request until the step to send the request comes. Otherwise you can by mistage crash the whole domain.
- Open an browser that is connected to Burp suite
- Visit: https://██████████/██████████ (More path are vulnerable but this is an example)
- Intercept the request with Burp suite and add it to the repeater.
IMPORTEN Add an random parameter at the end as example: &CPDoS=1 in the url bar at Repeater. (See image at step 4.) 4. Add an nonexcisting port at the host header domain. Ex: 1234 Your request raw data should look like below:
█████ If an random paramter is added at the end AND the port is added to the host header. You can now send the request in Burp suite repeater tab. The data will look similary to:
- You will see an 301 that do redirect and reflect the port you gave inside the request.
In the request raw data. Delete the port number inside the host header. Send the request now one more time. You will see the port you added before is still reflecting in the 301 redirect code. This indicates that it's now cache poisoned and the domain path is down. Try visit the url and you can see you won't be able to load it.
Suggested Mitigation/Remediation Actions
Configure the cache server on all paths and locations on the domain.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cache key did not include the Host header port, so a redirect built from an attacker-supplied port was cached and served to other users.
Impact
An attacker could make most paths on the domain unreachable for other users, though the effect is limited to the specific paths that were poisoned.
What the attacker needed
Ability to send crafted HTTP requests; target path is cacheable; no authentication needed
The fix
Configure the cache server on all paths and locations on the domain.
How it was found
- Open a browser connected to Burp Suite and visit a page on the domain.
- Intercept the request and send it to Repeater.
- Add a random parameter to the end of the URL.
- Add a non-existent port to the Host header and send the request.
- Observe the 301 redirect reflecting the port, then remove the port from the Host header and send again.
- See that the port is still reflected, meaning the path is now cache poisoned and will not load.
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 report has not been written yet. The Original tab links to the source.
A cache is a server that keeps copies of pages so they load faster for everyone. Here the site saved a broken redirect that included a made-up port number, and then handed that broken copy to every visitor of that page. Because the saved copy was wrong, visitors could no longer reach the page, which is a denial of service.
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.