BIT-libpython-2023-24329: High severity Python urllib.parse vulnerability
An issue in the urllib.parse component of Python before 3.11.4 allows attackers to bypass blocklisting methods by supplying a URL that starts with blank characters.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications that use Python's urllib.parse to enforce URL blocklists and accept attacker-controlled URLs are exposed. The bypass relies on URLs beginning with blank characters.
What does an attacker need to exploit it?
An attacker needs to be able to supply a URL to the affected application's blocklisting logic. The provided severity vector indicates no privileges or user interaction are required.
How can I determine whether an application is affected?
Check whether it runs Python before 3.11.4 and uses urllib.parse as part of URL blocklisting or validation. Test whether a blocked URL prefixed with blank characters is accepted or parsed in a way that bypasses the intended blocklist.
What should be done if the affected code is in use?
Upgrade Python to 3.11.4 or later. Until then, ensure URL validation and blocklist checks account for leading blank characters before making allow or deny decisions.