Description
py7zr is a Python-based library and utility to support 7zip archive compression, decompression, encryption and decryption. Prior to 1.1.3, PackInfo._read() in archiveinfo.py used an O(n^2) cumulative sum pattern for attacker-controlled numstreams values parsed from archive headers, allowing a crafted .7z archive to cause excessive CPU consumption during SevenZipFile.init() before extraction. This issue is fixed in version 1.1.3.
Published: 2026-07-08
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

PackInfo._read() in the py7zr library uses an O(n^2) cumulative sum algorithm when parsing the numstreams field from 7z archive headers. Prior to version 1.1.3, this routine handled attacker‑controlled numstreams values without length checks, allowing an adversary to craft a .7z file with large or carefully chosen numstreams values that cause the function to perform excessive CPU cycles during the SevenZipFile.init() stage before any extraction occurs. This can block the host process and deny service. The flaw arises from an algorithmic complexity error (CWE-407).

Affected Systems

The vulnerability affects the miurahr:py7zr library in any release prior to version 1.1.3 and processes 7zip archives from untrusted sources, potentially impacting command‑line utilities, scripts, or services that use the library for file archival or extraction.

Risk and Exploitability

A CVSS score of 8.7 marks this issue as high severity. The EPSS score is <1% and the vulnerability is not listed in CISA’s KEV catalog. A malicious .7z file can be supplied locally or remotely, depending on how the application receives archives. The likely attack vector is the ingestion of a crafted archive that triggers the O(n^2) processing of the numstreams field during SevenZipFile.init(), leading to excessive CPU consumption and possible service interruption.

Generated by OpenCVE AI on July 26, 2026 at 17:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to py7zr version 1.1.3 or newer to apply the fixed algorithm.
  • Where possible, run archive extraction in a restricted environment or container that imposes CPU limits to prevent runaway processes.
  • Implement monitoring or throttling of CPU usage for processes that invoke py7zr to detect and mitigate unexpected spikes in consumption.

Generated by OpenCVE AI on July 26, 2026 at 17:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-h4gh-22qq-72r7 py7zr: O(n^2) algorithmic complexity DoS in PackInfo._read()
History

Thu, 09 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 09 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-606
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Wed, 08 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Miurahr
Miurahr py7zr
Vendors & Products Miurahr
Miurahr py7zr

Wed, 08 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
Description py7zr is a Python-based library and utility to support 7zip archive compression, decompression, encryption and decryption. Prior to 1.1.3, PackInfo._read() in archiveinfo.py used an O(n^2) cumulative sum pattern for attacker-controlled numstreams values parsed from archive headers, allowing a crafted .7z archive to cause excessive CPU consumption during SevenZipFile.init() before extraction. This issue is fixed in version 1.1.3.
Title py7zr: O(n^2) algorithmic complexity DoS in PackInfo._read()
Weaknesses CWE-407
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T14:26:55.698Z

Reserved: 2026-06-16T16:16:32.627Z

Link: CVE-2026-55206

cve-icon Vulnrichment

Updated: 2026-07-09T14:26:43.451Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-08T20:32:09Z

Links: CVE-2026-55206 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:15:04Z

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-606

    Unchecked Input for Loop Condition