Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-44722

CVE-2026-44722: pyzipper Information Disclosure Vulnerability

CVE-2026-44722 is an information disclosure flaw in pyzipper that exposes plaintext CRC32 checksums in encrypted ZIP files, enabling brute-force attacks. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-44722 Overview

CVE-2026-44722 is an information disclosure vulnerability in pyzipper, a Python library that replaces the standard zipfile module with support for AES-encrypted ZIP archives. Versions prior to 0.4.0 contain a Python operator precedence bug in pyzipper/zipfile_aes.py that prevents automatic selection of the AE-2 format during encryption. Encrypted entries are written in AE-1 format instead, which retains the plaintext CRC32 checksum in the ZIP header and, for unseekable archives, in the data descriptor section. An attacker who obtains the archive can brute-force candidate plaintexts for small or low-entropy files by comparing CRC32 values.

Critical Impact

Attackers who obtain affected archives can recover the contents of small or low-entropy encrypted files by brute-forcing plaintexts against the exposed CRC32 checksums.

Affected Products

  • pyzipper versions prior to 0.4.0
  • Python applications that use pyzipper to produce AES-encrypted ZIP archives
  • Archives generated with default encryption settings where AE-2 was expected

Discovery Timeline

  • 2026-07-17 - CVE-2026-44722 published to the National Vulnerability Database (NVD)
  • 2026-07-17 - Last updated in NVD database

Technical Details for CVE-2026-44722

Vulnerability Analysis

The AES-encrypted ZIP specification defines two formats. AE-1 stores the plaintext CRC32 of each entry in the local file header and central directory. AE-2 zeros the CRC32 field to prevent leaking information about the plaintext. pyzipper intended to automatically select AE-2 when encryption was enabled, but a Python operator precedence bug in pyzipper/zipfile_aes.py caused the selection logic to always evaluate against AE-1. Every encrypted entry therefore preserved the plaintext CRC32 in the ZIP header, and in unseekable output streams, the same value was also written into the data descriptor section. This weakness is categorized as [CWE-480] Use of Incorrect Operator.

Root Cause

The defect is an incorrect boolean expression in the format-selection path. Operator precedence between and, or, and comparison operators produced a condition that never evaluated true for AE-2, so the encryption routine defaulted to AE-1 regardless of caller intent. The CRC32 checksum, computed over the plaintext before AES encryption, was then written to the archive alongside the ciphertext.

Attack Vector

Exploitation requires local access to the encrypted archive but no interaction with the target system. An attacker extracts the CRC32 from each affected entry and enumerates candidate plaintexts, hashing each with CRC32 and comparing the result. For small files or files drawn from constrained keyspaces such as passwords, tokens, configuration snippets, or predictable document templates, brute-force recovery is tractable on commodity hardware. The attack does not require breaking AES; the confidentiality loss stems entirely from the exposed checksum.

python
# Security patch in pyzipper/zipfile.py
# Source: https://github.com/danifus/pyzipper/commit/93ce88e7dfd1635443197dab3fb8d477cff579ae
         self._zinfo.compress_size = self._compress_size
         self._zinfo.CRC = self._crc
         self._zinfo.file_size = self._file_size
+        if self._encrypter:
+            self._encrypter.finalize_zipinfo(self._zinfo)
 
         if not self._zip64:
             if self._file_size > ZIP64_LIMIT:

The fix delegates final ZipInfo adjustment to the encrypter, which clears the CRC32 field when AE-2 is used.

Detection Methods for CVE-2026-44722

Indicators of Compromise

  • Encrypted ZIP archives produced by pyzipper versions prior to 0.4.0 where entry headers contain non-zero CRC32 values
  • Archives whose central directory records show AES encryption flags together with populated CRC32 fields
  • Unseekable archive outputs whose data descriptor sections retain plaintext CRC32 values

Detection Strategies

  • Inventory Python environments and CI/CD pipelines to enumerate installed versions of pyzipper using pip show pyzipper or software bill of materials tooling
  • Parse encrypted ZIP archives in shared storage and flag entries that combine AES encryption with a non-zero CRC32 field, indicating AE-1 format
  • Review source repositories for calls into pyzipper that produce archives intended for external distribution

Monitoring Recommendations

  • Track dependency changes for pyzipper in package manifests and lockfiles across development and production repositories
  • Alert on the creation or transfer of AES-encrypted ZIP archives generated by pipelines still pinned to vulnerable pyzipper versions
  • Monitor code review activity for new usages of pyzipper to confirm they target 0.4.0 or later

How to Mitigate CVE-2026-44722

Immediate Actions Required

  • Upgrade pyzipper to version 0.4.0 or later in all Python environments, container images, and build systems
  • Re-encrypt existing archives that contain small or low-entropy files using a patched version so that CRC32 values are cleared
  • Treat previously distributed archives as potentially compromised for confidentiality if their plaintexts fall within a guessable keyspace

Patch Information

The issue is fixed in pyzipper0.4.0. The fix invokes self._encrypter.finalize_zipinfo(self._zinfo) before writing header metadata, which allows the AES encrypter to zero the CRC32 field in AE-2 mode. See the GitHub Security Advisory GHSA-crqm-m339-7m2p, the GitHub Release v0.4.0, and the upstream commit for reference details.

Workarounds

  • Avoid using pyzipper versions prior to 0.4.0 for archives that will leave the trust boundary
  • Compress and encrypt sensitive small files inside a larger container before passing them to pyzipper so that per-entry CRC32 values do not correspond to the sensitive plaintext
  • Restrict access to archives produced by vulnerable versions until they can be regenerated with the patched release
bash
# Upgrade pyzipper to the fixed release
pip install --upgrade 'pyzipper>=0.4.0'

# Verify the installed version
python -c "import pyzipper; print(pyzipper.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.