BIT-python-2024-7592: Quadratic complexity parsing cookies with backslashes
Published Aug 19, 2024
·Updated
There is a LOW severity vulnerability affecting CPython, specifically the 'http.cookies' standard library module.
When parsing cookies that contained backslashes for quoted characters in the cookie value, the parser would use an algorithm with quadratic complexity, resulting in excess CPU resources being used while parsing the value.
Affected Software
1 affected component
Python Software Foundation CPython
Event History
Aug 19, 2024
CVE Published
via OSV·07:06 PM
Data Sourced
via OSV·07:06 PM
DescriptionSeverityWeakness
Frequently Asked Questions
1
What access does an attacker need to exploit this issue?
The attack vector is network-based and requires no privileges or user interaction. An attacker needs to cause a vulnerable CPython application to parse a crafted cookie value.
2
What cookie content triggers the costly parsing behavior?
The affected parsing path is triggered by cookies containing backslashes used for quoted characters in the cookie value. Such input can cause excessive CPU consumption during parsing.