CVE-2025-13836
Public on
Last Modified:
Description
A flaw was found in the http.client module in the Python standard library. When reading an HTTP response from a server, if no read amount is specified, the default behavior will be to use Content-Length. This issue allows a malicious server to cause the client to read large amounts of data into memory, potentially causing memory allocations errors, swapping, out-of-memory conditions or even system freezes.
Statement
This issue can only be exploited by Python applications using the http.client.HTTPResponse.read function without the amount parameter, which specifies the read size in bytes. Note that Python libraries may use this function internally and make applications vulnerable. Additionally, vulnerable Python applications must connect to a malicious or compromised server that replies with a very large or crafted Content-Length header to trigger this issue, limiting the exposure of this vulnerability.
Mitigation
Since this vulnerability is triggered when no read amount is specified and the client defaults to using the potentially malicious Content-Length header, developers can mitigate this issue in their code by always imposing an explicit, safe limit on data reads.
Applications using the http.client.HTTPResponse.read function directly can ensure that read operations specify a byte limit:
...
max_safe_read = 10 * 1024 * 1024
data = response.read(max_safe_read)
...
Additional Information
- This content is not included.Bugzilla 2418078: cpython: Excessive read buffering DoS in http.client
- Content from cwe.mitre.org is not included.CWE-770: Allocation of Resources Without Limits or Throttling
- FAQ: Frequently asked questions about CVE-2025-13836
- Offline Security Data data is available for integration with other systems. See Offline Security Data API to get started.
External References
Content from www.cve.org is not included.https://www.cve.org/CVERecord?id=CVE-2025-13836
Content from nvd.nist.gov is not included.https://nvd.nist.gov/vuln/detail/CVE-2025-13836
Content from github.com is not included.https://github.com/python/cpython/issues/119451
Content from github.com is not included.https://github.com/python/cpython/pull/119454
Affected Packages and Issued Red Hat Security Errata
| Products / Services | Components | State | Errata |
|---|---|---|---|
| Red Hat Discovery 2 | discovery/discovery-server-rhel9 | Fixed | RHSA-2026:1736 |
| Red Hat Enterprise Linux 10 | python3.12 | Fixed | RHSA-2026:1828 |
| Red Hat Enterprise Linux 10 | firefox | Not affected | |
| Red Hat Enterprise Linux 10.0 Extended Update Support | python3.12 | Fixed | RHSA-2026:2233 |
| Red Hat Enterprise Linux 6 | python | Not affected | |
| Red Hat Enterprise Linux 7 | firefox | Not affected | |
| Red Hat Enterprise Linux 7 | python | Not affected | |
| Red Hat Enterprise Linux 7 | python3 | Not affected | |
| Red Hat Enterprise Linux 8 | python3.11 | Fixed | RHSA-2026:1374 |
| Red Hat Enterprise Linux 8 | python3.12 | Fixed | RHSA-2026:2419 |
| Red Hat Enterprise Linux 8 | firefox | Not affected | |
| Red Hat Enterprise Linux 8 | python3 | Not affected | |
| Red Hat Enterprise Linux 8 | python36:3.6/python36 | Not affected | |
| Red Hat Enterprise Linux 8 | python39-devel:3.9/python39 | Not affected | |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | python3.11 | Fixed | RHSA-2026:2084 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | python3.11 | Fixed | RHSA-2026:2084 |
| Red Hat Enterprise Linux 9 | python3.12 | Fixed | RHSA-2026:1408 |
| Red Hat Enterprise Linux 9 | python3.11 | Fixed | RHSA-2026:1410 |
| Red Hat Enterprise Linux 9 | firefox | Not affected | |
| Red Hat Enterprise Linux 9 | python3.9 | Not affected | |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | python3.11 | Fixed | RHSA-2026:1922 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | python3.11 | Fixed | RHSA-2026:1893 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | python3.12 | Fixed | RHSA-2026:3897 |
| Red Hat Enterprise Linux 9.6 Extended Update Support | python3.11 | Fixed | RHSA-2026:1892 |
| Red Hat Enterprise Linux 9.6 Extended Update Support | python3.12 | Fixed | RHSA-2026:3900 |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-amd-rhel9 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-aws-nvidia-rhel9 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-azure-amd-rhel9 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-azure-nvidia-rhel9 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-gcp-nvidia-rhel9 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-nvidia-rhel9 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-aws-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-azure-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-cuda-rhel9 | Affected | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-gcp-cuda-rhel9 | Affected | |
| Red Hat OpenShift AI (RHOAI) | rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9 | Not affected | |
| Red Hat OpenShift Dev Spaces | devspaces/pluginregistry-rhel9 | Affected | |
| Red Hat OpenShift Dev Spaces | devspaces-tech-preview/idea-rhel9 | Not affected | |
| Red Hat OpenShift Dev Spaces | devspaces/code-rhel9 | Not affected | |
| Red Hat Update Infrastructure 5 | rhui5/installer-rhel9 | Fixed | RHSA-2026:2563 |
| Red Hat Update Infrastructure 5 | rhui5/rhua-rhel9 | Fixed | RHSA-2026:2563 |
| Red Hat Update Infrastructure 5 | rhui5/cds-rhel9 | Fixed | RHSA-2026:4943 |
Common Vulnerability Scoring System (CVSS) Score Details
Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authorities (CNA) source for its products and services (see Red Hat classifications ).
| CVSS v3 Score Breakdown | Red Hat | NVD |
|---|---|---|
| CVSS v3 Base Score | 6.8 | 7.5 |
| Attack Vector | Network | Network |
| Attack Complexity | High | Low |
| Privileges Required | None | None |
| User Interaction | None | None |
| Scope | Changed | Unchanged |
| Confidentiality Impact | None | None |
| Integrity Impact | None | None |
| Availability Impact | High | High |
CVSS v3 Vector
Red Hat CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H
NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat CVSS v3 Score Explanation
A vulnerable Python application must connect to a malicious or compromised server that replies with a very large or crafted Content-Length header, causing an excessive memory allocation, potentially impacting the system. To reflect these conditions, the attack complexity metric is set to high and the scope metric is set to changed. Additionally, the only security impact of this issue is a denial of service, thus the confidentiality metric is set to none.
Frequently Asked Questions
Why is Red Hat's CVSS v3 score or Impact different from other vendors?
For more information, see https://access.redhat.com/solutions/762393.
My product is listed as "Under investigation" or "Affected", when will Red Hat release a fix for this vulnerability?
- "Under investigation" doesn't necessarily mean that the product is affected by this vulnerability. It only means that our Analysis Team is still working on determining whether the product is affected and how it is affected.
- "Affected" means that our Analysis Team has determined that this product is affected by this vulnerability and might release a fix to address this in the near future.
What can I do if my product is listed as "Will not fix"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Upgrade to a supported product version that includes a fix for this vulnerability (recommended).
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
What can I do if my product is listed as "Fix deferred"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
- Red Hat Engineering focuses on addressing high-priority issues based on their complexity or limited lifecycle support. Therefore, lower-priority issues will not receive immediate fixes.
What is a mitigation?
I have a Red Hat product but it is not in the above list, is it affected?
Why is my security scanner reporting my product as vulnerable to this vulnerability even though my product version is fixed or not affected?
My product is listed as "Out of Support Scope". What does this mean?
Not sure what something means? Check out our Security Glossary.