CVE-2025-8194
Public on
Last Modified:
Description
A flaw was found in the Python tarfile module. Processing a specially crafted tar archive, specifically an archive with negative offsets, can cause an infinite loop and deadlock. This issue results in a denial of service in the Python application using the tarfile module.
Statement
To exploit this issue, an attacker needs to be able to process a specially crafted tar archive with a Python application using the tarfile module. Furthermore, this vulnerability will cause a denial of service with no other security impact.
Mitigation
This flaw can be mitigated by adding the following code after importing the tarfile module ("import tarfile"):
import tarfile
def _block_patched(self, count):
if count < 0: # pragma: no cover
raise tarfile.InvalidHeaderError("invalid offset")
return _block_patched._orig_block(self, count)
_block_patched._orig_block = tarfile.TarInfo._block
tarfile.TarInfo._block = _block_patched
Additional Information
- This content is not included.Bugzilla 2384043: cpython: Cpython infinite loop when parsing a tarfile
- Content from cwe.mitre.org is not included.CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
- FAQ: Frequently asked questions about CVE-2025-8194
- 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-8194
Content from nvd.nist.gov is not included.https://nvd.nist.gov/vuln/detail/CVE-2025-8194
Content from github.com is not included.https://github.com/python/cpython/issues/130577
Content from github.com is not included.https://github.com/python/cpython/pull/137027
Affected Packages and Issued Red Hat Security Errata
| Products / Services | Components | State | Errata |
|---|---|---|---|
| Red Hat Discovery 2 | discovery/discovery-server-rhel9 | Fixed | RHSA-2025:16524 |
| Red Hat Enterprise Linux 10 | python3.12 | Fixed | RHSA-2025:14984 |
| Red Hat Enterprise Linux 6 | python | Not affected | |
| Red Hat Enterprise Linux 7 | python | Not affected | |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | python3 | Fixed | RHSA-2025:16117 |
| Red Hat Enterprise Linux 8 | python36:3.6/python36 | Affected | |
| Red Hat Enterprise Linux 8 | python3.12 | Fixed | RHSA-2025:14546 |
| Red Hat Enterprise Linux 8 | python3 | Fixed | RHSA-2025:14560 |
| Red Hat Enterprise Linux 8 | python3.11 | Fixed | RHSA-2025:14841 |
| Red Hat Enterprise Linux 8 | python39-devel:3.9 | Fixed | RHSA-2025:14900 |
| Red Hat Enterprise Linux 8 | python39:3.9 | Fixed | RHSA-2025:14900 |
| Red Hat Enterprise Linux 8.2 Advanced Update Support | python3 | Fixed | RHSA-2025:16262 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | python39:3.9 | Fixed | RHSA-2025:16078 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | python3 | Fixed | RHSA-2025:16151 |
| Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | python39:3.9 | Fixed | RHSA-2025:16078 |
| Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | python3 | Fixed | RHSA-2025:16151 |
| Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | python3 | Fixed | RHSA-2025:15968 |
| Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | python39:3.9 | Fixed | RHSA-2025:16118 |
| Red Hat Enterprise Linux 8.6 Telecommunications Update Service | python3 | Fixed | RHSA-2025:15968 |
| Red Hat Enterprise Linux 8.6 Telecommunications Update Service | python39:3.9 | Fixed | RHSA-2025:16118 |
| Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions | python3 | Fixed | RHSA-2025:15968 |
| Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions | python39:3.9 | Fixed | RHSA-2025:16118 |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | python3.11 | Fixed | RHSA-2025:16031 |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | python39:3.9 | Fixed | RHSA-2025:16062 |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | python3 | Fixed | RHSA-2025:16153 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | python3.11 | Fixed | RHSA-2025:16031 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | python39:3.9 | Fixed | RHSA-2025:16062 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | python3 | Fixed | RHSA-2025:16153 |
| Red Hat Enterprise Linux 9 | python3.12 | Fixed | RHSA-2025:15007 |
| Red Hat Enterprise Linux 9 | python3.11 | Fixed | RHSA-2025:15010 |
| Red Hat Enterprise Linux 9 | python3.9 | Fixed | RHSA-2025:15019 |
| Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | python3.9 | Fixed | RHSA-2025:15724 |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | python3.11 | Fixed | RHSA-2025:16012 |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | python3.9 | Fixed | RHSA-2025:16152 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | python3.12 | Fixed | RHSA-2025:15348 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | python3.9 | Fixed | RHSA-2025:15800 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | python3.11 | Fixed | RHSA-2025:16016 |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/granite-3.1-8b-lab-v2.1 | Will not fix | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/granite-3.1-8b-starter-v2.1 | Will not fix | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/modelcar-granite-3-1-8b-lab-v2-1 | Will not fix | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/modelcar-granite-3-1-8b-starter-v2-1 | Will not fix | |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/instructlab-intel-rhel9 | Fixed | This content is not included.RHSA-2025:19421 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-intel-rhel9 | Fixed | RHSA-2025:19422 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/instructlab-nvidia-rhel9 | Fixed | RHSA-2025:19423 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-azure-amd-rhel9 | Fixed | RHSA-2025:19424 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/instructlab-amd-rhel9 | Fixed | RHSA-2025:19425 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-gcp-nvidia-rhel9 | Fixed | RHSA-2025:19426 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-amd-rhel9 | Fixed | RHSA-2025:19427 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-nvidia-rhel9 | Fixed | RHSA-2025:19428 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-aws-nvidia-rhel9 | Fixed | RHSA-2025:19429 |
| Red Hat Enterprise Linux AI 1.5 | rhelai1/bootc-azure-nvidia-rhel9 | Fixed | RHSA-2025:19430 |
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 | 7.5 | |
| Attack Vector | Network | |
| Attack Complexity | Low | |
| Privileges Required | None | |
| User Interaction | None | |
| Scope | Unchanged | |
| Confidentiality Impact | None | |
| Integrity Impact | None | |
| Availability Impact | High |
CVSS v3 Vector
Red Hat CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
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.