CVE-2025-15282
Rocky Linux vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitation steps

  1. Identify a vulnerable target: Find a Python application (running CPython < 3.15.0) that accepts user-supplied input and passes it as or within a data: URL to urllib.request.urlopen() or a similar function using DataHandler.
  2. Craft a malicious data URL: Construct a data: URL where the mediatype field contains a CRLF sequence, for example: data:text/html\r\nInjected-Header: malicious-value;base64,ZGF0YQ==.
  3. Submit the payload: Provide this crafted URL as input to the vulnerable application endpoint or parameter that feeds into urllib.request.urlopen().
  4. Header injection achieved: The 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.
  5. Leverage the injection: Use the injected header for cache poisoning, security control bypass, log tampering, or further exploitation depending on the application's behavior (CPython PR #143926, CPython Commit).

Indicators of compromise

  • Logs: Application logs showing 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:...).
  • Network: Unexpected or anomalous HTTP headers appearing in outbound requests from Python-based services, particularly headers not generated by the application logic.
  • Application Errors: Absence of ValueError exceptions for malformed data: URLs in unpatched applications may indicate exploitation attempts are not being blocked.

Mitigation and workarounds

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).

Community reactions

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).

Additional resources


SourceThis report was generated using AI

Related Rocky Linux vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64600HIGH7.8
  • Linux Kernel logoLinux Kernel
  • kernel-debug
NoYesJul 23, 2026
CVE-2026-47063HIGH7.5
  • Amazon Corretto JDK logoAmazon Corretto JDK
  • java-17-openjdk-jmods
NoYesJul 21, 2026
CVE-2026-60147MEDIUM6.5
  • Amazon Corretto JDK logoAmazon Corretto JDK
  • java-1.8.0-openjdk-demo
NoYesJul 21, 2026
CVE-2026-47059LOW3.7
  • Amazon Corretto JDK logoAmazon Corretto JDK
  • java-11-amazon-corretto
NoYesJul 21, 2026
CVE-2026-14957NONEN/A
  • Rocky Linux logoRocky Linux
  • libreswan
NoYesJul 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management