1.8 KiB
CVE-2024-9681
Description
When curl is asked to use HSTS, the expiry time for a subdomain mightoverwrite a parent domain's cache entry, making it end sooner or later thanotherwise intended.This affects curl using applications that enable HSTS and use URLs with theinsecure HTTP:// scheme and perform transfers with hosts likex.example.com as well as example.com where the first host is a subdomainof the second host.(The HSTS cache either needs to have been populated manually or there needs tohave been previous HTTPS accesses done as the cache needs to have entries forthe domains involved to trigger this problem.)When x.example.com responds with Strict-Transport-Security: headers, thisbug can make the subdomain's expiry timeout bleed over and get set for theparent domain example.com in curl's HSTS cache.The result of a triggered bug is that HTTP accesses to example.com getconverted to HTTPS for a different period of time than what was asked for bythe origin server. If example.com for example stops supporting HTTPS at itsexpiry time, curl might then fail to access http://example.com until the(wrongly set) timeout expires. This bug can also expire the parent's entryearlier, thus making curl inadvertently switch back to insecure HTTP earlierthan otherwise intended.
POC
Reference
No PoCs from references.