curl cookie mixed case PSL bypass
curl's cookie domain check against the Public Suffix List was case-sensitive, so a malicious server could set a cookie for a mixed-case public suffix and have it sent to unrelated sites. An attacker could therefore plant a 'super cookie' that leaks to other domains.
- Triaged in 4 hours
- Fixed in 15 days
- Paid in 15 days
- Disclosed after 16 days
Summary by the program
CVE-2023-46218 - cookie mixed case PSL bypass
VULNERABILITY This flaw allows a malicious HTTP server to set "super cookies" in curl that are then passed back to more origins than what is otherwise allowed or possible. This allows a site to set cookies that then would get sent to different and unrelated sites and domains.
It could do this by exploiting a mixed case flaw in curl's function that verifies a given cookie domain against the Public Suffix List (PSL). For example a cookie could be set with domain=co.UK when the URL used a lowercase hostname curl.co.uk, even though co.uk is listed as a PSL domain.
Full Security Advisory: https://curl.se/docs/CVE-2023-46218.html
The report
A vulnerability in curl allows a malicious HTTP server to set "super cookies" in curl that are then passed back to more origins than what is otherwise allowed or possible. This allows a site to set cookies that then would get sent to different and unrelated sites and domains.
It could do this by exploiting a mixed case flaw in curl's function that verifies a given cookie domain against the Public Suffix List (PSL). For example a cookie could be set with domain=co.UK when the URL used a lowercase hostname curl.co.uk, even though co.uk is listed as a PSL domain.
Impact
Issue supercookies bypassing the Public Suffix List check.
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 Public Suffix List comparison was case-sensitive, so a mixed-case suffix did not match the lowercase entry and the cookie was accepted.
Impact
A malicious server could set a cookie that curl then sends to different and unrelated sites and domains, bypassing the Public Suffix List check.
What the attacker needed
Victim uses curl to visit a malicious server
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 cookie is a small piece of data a website asks your browser or tool to store and send back later. The Public Suffix List is a list of endings like co.uk that belong to everyone, so a single site should not be allowed to set a cookie for the whole ending. Here curl compared the cookie's domain with that list without ignoring letter case, so a mixed-case spelling slipped past the check.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.