
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-15282 is a CRLF injection vulnerability in Python's urllib.request.DataHandler that allows user-controlled data URLs to inject arbitrary HTTP headers by embedding newline characters in the data: URL mediatype field. It affects CPython versions prior to 3.15.0 and was disclosed on January 20, 2026, by the Python Software Foundation (PSF). The fix was merged into CPython's main branch on January 20, 2026, and backported to branches 3.10 through 3.14. It carries a CVSS v4.0 base score of 6.0 (Medium) (EUVD, CPython Issue).
The root cause is improper neutralization of CRLF sequences (CWE-93) in the data_open method of urllib.request.DataHandler (Lib/urllib/request.py). When parsing a data: URL, the mediatype portion (the segment before the comma) was not validated for control characters, allowing an attacker who controls the data URL to embed \r\n sequences and inject additional HTTP headers into the resulting request. The fix adds a regex check (re.search(r"[\x00-\x1F\x7F]", mediatype)) that raises a ValueError if any C0 control characters or DEL are found in the mediatype field. Exploitation requires that the attacker can supply or influence a data: URL that is subsequently processed by urllib.request.urlopen or a similar call (CPython PR #143926, CPython Commit).
Successful exploitation allows an attacker to inject arbitrary HTTP headers into requests made by a Python application using urllib.request.DataHandler, potentially enabling header smuggling, cache poisoning, or bypassing security controls that rely on header integrity. The primary impact is on integrity (rated High for the vulnerable component), with limited secondary integrity impact on downstream systems. Confidentiality and availability are not directly affected by this vulnerability (EUVD, CPython Issue).
data: URL to urllib.request.urlopen() or a similar function using DataHandler.data: URL where the mediatype field contains a CRLF sequence, for example: data:text/html\r\nInjected-Header: malicious-value;base64,ZGF0YQ==.urllib.request.urlopen().DataHandler.data_open() method parses the mediatype without sanitization, causing the injected \r\n to be interpreted as a header delimiter, inserting the attacker-controlled header into the HTTP request or response context.data: URLs with encoded or literal %0d%0a, \r\n, or other control characters in the mediatype segment (e.g., data:text/html%0d%0aX-Injected:...).ValueError exceptions for malformed data: URLs in unpatched applications may indicate exploitation attempts are not being blocked.The Python Software Foundation released patches for all supported branches: the fix was merged to main (targeting 3.15.0) on January 20, 2026, and backported to CPython 3.10, 3.11, 3.12, 3.13, and 3.14. Downstream distributions including Debian, Ubuntu (USN-8018-1, USN-8018-2, USN-8018-3), SUSE, Fedora, Red Hat (RHSA-2026:10950), AlmaLinux, Rocky Linux, Amazon Linux, and openSUSE have released updated packages. Users should upgrade to the patched Python version provided by their distribution. As a workaround, applications should validate and sanitize any user-controlled input before using it in data: URLs processed by urllib.request (CPython PR #143926, Ubuntu Advisory, Red Hat Advisory).
The vulnerability was reported and fixed by Seth Michael Larson (PSF Security Developer-in-Residence), with the fix reviewed and approved by CPython core developers. The issue was disclosed via the Python security announcement mailing list and the oss-security list. Downstream Linux distributions responded promptly with security updates across major platforms. No significant controversy or notable social media discussion beyond routine security update announcements has been observed (Python Security Announce, oss-security).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."