Python CPython
cpe:2.3:a:python:cpython:*:*:*:*:*:*:*
A vulnerability exists in the Python standard library's urllib module, specifically within the DataHandler component. This issue allows for header injection by exploiting user-controlled data URLs. The vulnerability arises from the improper handling of control characters in the data URL mediatype, which can be used to inject newlines and manipulate header parsing.
Exploitation of this vulnerability could lead to arbitrary header injection, potentially allowing for manipulation of HTTP headers in a way that could be exploited by an attacker.
To reproduce this vulnerability, create a data URL that includes control characters, such as C0 control characters, in the mediatype portion of the URL. This can be done by crafting a data URL that deliberately includes newlines or other control characters in the mediatype, which will then be parsed by urllib's DataHandler. The injected control characters can manipulate how headers are processed, leading to the injection of arbitrary headers.
Users should update to the latest version of Python where this vulnerability has been addressed. Instructions for updating Python can be found on the official Python website.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.