py7zr

CVE-2026-55206

CVE-2026-55206 is a medium-severity security vulnerability in py7zr (pip), affecting versions <= 1.1.2. It is fixed in 1.1.3.

Key facts
CVSS score
N/A
Medium
Attack vector
Not available
Issuing authority
GitHub Advisory Database
Affected package
py7zr
Fixed in
1.1.3
Disclosed
2026

Summary

Summary PackInfo.read() uses an O(n^2) cumulative sum pattern where numstreams is read directly from the archive header. A crafted .7z archive with a large numstreams value causes excessive CPU consumption during SevenZipFile.init(), no extraction is needed. A 50 KB archive takes ~7 seconds of CPU time. Details The vulnerable code is in PackInfo.read() (archiveinfo.py): self.packpositions = [sum(self.packsizes[:i]) for i in range(self.numstreams + 1)] numstreams is parsed from the archive header via readuint64() and is attacker-controlled. Each sum(self.packsizes[:i]) re-sums from the beginning, producing O(n^2) total work. This runs during header parsing in SevenZipFile.init(), before any extraction. Suggested fix, replace with O(n) cumulative sum: from itertools import accumulate self.packpositions = [0] + list(accumulate(self.packsizes)) PoC Tested on py7zr 1.1.0, Python 3.12.3, Linux x8664. Results: n= 1000 size= 1042 bytes time=0.004s n= 5000 size= 5042 bytes time=0.071s n= 10000 size= 10042 bytes time=0.291s n= 30000 size= 30043 bytes time=2.609s n= 50000 size= 50043 bytes time=7.097s Impact Denial of Service. Any application that opens .7z archives from untrusted sources using py7zr.SevenZipFile() can be caused to consume excessive CPU time with a small crafted archive. The quadratic cost occurs during header parsing, before any content extraction.

Impact

Not available

Affected versions

pip

  • py7zr (<= 1.1.2)

Security releases

  • py7zr → 1.1.3 (pip)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-55206 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-55206 is reachable in your applications. Get a demo

Remediation advice

Upgrade py7zr to 1.1.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-55206

What is CVE-2026-55206?

CVE-2026-55206 is a medium-severity security vulnerability in py7zr (pip), affecting versions <= 1.1.2. It is fixed in 1.1.3.

Which versions of py7zr are affected by CVE-2026-55206?

py7zr (pip) versions <= 1.1.2 is affected.

Is there a fix for CVE-2026-55206?

Yes. CVE-2026-55206 is fixed in 1.1.3. Upgrade to this version or later.

Is CVE-2026-55206 exploitable, and should I be worried?

Whether CVE-2026-55206 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-55206 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-55206?

Upgrade py7zr to 1.1.3 or later.

Stop the waste.
Protect your environment with Kodem.