Impact
PackInfo._read() in py7zr's archiveinfo.py uses an O(n^2) cumulative sum algorithm to process the numstreams field from 7z archive headers. Before version 1.1.3 the routine accepted attacker‑controlled numstreams values without proper length validation, allowing a crafted .7z file to cause excessive CPU consumption during the SevenZipFile.init() stage without any extraction occurring. The result is a denial‑of‑service due to high CPU usage. The weakness is an algorithmic‑complexity error (CWE‑407) combined with unchecked input that permits resource exhaustion (CWE‑606).
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.
OpenCVE Enrichment
Github GHSA