Vulnerabilities in pkg:pypi/pyminizip

PACKAGE
Advisory Identifier: GHSA-mq29-j5xf-cjwr
Advisory Summary

CVE-2023-45853 is a CRITICAL (CVSS 9.8) pyminizip affected by zlib's integer vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Pyminizip libraries in the PyPI ecosystem. The issue involves pyminizip affected by zlib's integer overflow/heap based buffer overflow vulnerability due to vulnerable dependency. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pyminizip

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/pyminizip. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mq29-j5xf-cjwr CVE-2023-45853 CRITICAL pyminizip affected by zlib's integer overflow/heap based buffer overflow vulnerability due to vulnerable dependency

CVE-2023-45853 at a Glance

CVE Identifier CVE-2023-45853
GHSA Identifier GHSA-mq29-j5xf-cjwr
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-190: Integer Overflow or Wraparound
Affected Product Pyminizip
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-45853

To remediate this vulnerability, upgrade all affected Pyminizip dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pyminizip fixed: Latest secure release
pip install pyminizip>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pyminizip

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-45853, inspect your installed packages using pip:

pip show pyminizip

Analyze the terminal output to locate any version of Pyminizip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show pyminizip command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Pyminizip, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

MiniZip in zlib through 1.3 has an integer overflow and resultant heap-based buffer overflow in zipOpenNewFileInZip4_64 via a long filename, comment, or extra field. NOTE: MiniZip is not a supported part of the zlib product. pyminizip uses version 1.2.11 of zlib's code.

CVE-2023-45853 Affected Pyminizip Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pyminizip
PyPI
≤ 0.2.6

References

NVD — CVE-2023-45853 NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-45853
Pyminizip Source Repository REPOSITORY
https://github.com/madler/zlib/pull/843
Security Fix Commit FIX COMMIT
https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c
chromium.googlesource.com/chromium/src/+/d709... WEB
https://chromium.googlesource.com/chromium/src/+/d709fb23806858847131027da95ef4c548813356
chromium.googlesource.com/chromium/src/+/de29... WEB
https://chromium.googlesource.com/chromium/src/+/de29dd6c7151d3cd37cb4cf0036800ddfb1d8b61
Pyminizip Source Repository REPOSITORY
https://github.com/madler/zlib/blob/ac8f12c97d1afd9bafa9c710f827d40a407d3266/contrib/README.contrib#L1-L4
Pyminizip Source Repository REPOSITORY
https://github.com/smihica/pyminizip
Pyminizip Source Repository REPOSITORY
https://github.com/smihica/pyminizip/blob/master/zlib-1.2.11/contrib/minizip/zip.c
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2023/11/msg00026.html
pypi.org/project/pyminizip/ WEB
https://pypi.org/project/pyminizip/#history
Pyminizip Security Information SECURITY
https://security.gentoo.org/glsa/202401-18
Pyminizip Security Information SECURITY
https://security.netapp.com/advisory/ntap-20231130-0009
www.winimage.com/zlibdll/minizip.htm... WEB
https://www.winimage.com/zLibDll/minizip.html
Pyminizip Security Information SECURITY
http://www.openwall.com/lists/oss-security/2023/10/20/9
Pyminizip Security Information SECURITY
http://www.openwall.com/lists/oss-security/2024/01/24/10

Frequently Asked Questions

What is CVE-2023-45853?
CVE-2023-45853 is a security vulnerability in Pyminizip involving pyminizip affected by zlib's integer overflow/heap based buffer overflow vulnerability due to vulnerable dependency under CWE-190: Integer Overflow or Wraparound.
Which Pyminizip versions are affected?
Affected versions include releases prior to current release patches across affected packages: pyminizip.
What version fixes CVE-2023-45853?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyminizip affected?
Yes, pyminizip is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-45853?
CVE-2023-45853 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-45853?
CVE-2023-45853 is classified under CWE-190: Integer Overflow or Wraparound (The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.).
How can I check PyPI dependencies for CVE-2023-45853?
Run the dependency tree command: 'pip show pyminizip'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mq29-j5xf-cjwr",
  "modified" : "2023-12-18T19:33:06Z",
  "published" : "2023-10-14T03:31:16Z",
  "aliases" : [ "CVE-2023-45853" ],
  "summary" : "pyminizip affected by zlib's integer overflow/heap based buffer overflow vulnerability due to vulnerable dependency",
  "details" : "MiniZip in zlib through 1.3 has an integer overflow and resultant heap-based buffer overflow in zipOpenNewFileInZip4_64 via a long filename, comment, or extra field. NOTE: MiniZip is not a supported part of the zlib product.\n\npyminizip uses version 1.2.11 of zlib's code.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyminizip"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45853"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/madler/zlib/pull/843"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c"
  }, {
    "type" : "WEB",
    "url" : "https://chromium.googlesource.com/chromium/src/+/d709fb23806858847131027da95ef4c548813356"
  }, {
    "type" : "WEB",
    "url" : "https://chromium.googlesource.com/chromium/src/+/de29dd6c7151d3cd37cb4cf0036800ddfb1d8b61"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/madler/zlib/blob/ac8f12c97d1afd9bafa9c710f827d40a407d3266/contrib/README.contrib#L1-L4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/smihica/pyminizip"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smihica/pyminizip/blob/master/zlib-1.2.11/contrib/minizip/zip.c"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/11/msg00026.html"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/pyminizip/#history"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202401-18"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20231130-0009"
  }, {
    "type" : "WEB",
    "url" : "https://www.winimage.com/zLibDll/minizip.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2023/10/20/9"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/01/24/10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-190" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-18T19:33:06Z",
    "nvd_published_at" : "2023-10-14T02:15:09Z"
  }
}