# CVE-2021-45943: PYSEC-2022-43065 - GDAL 3.3.0 through 3.4.0 has a heap-based buffer overflow in PCIDSK::CPCIDSKFile::ReadFromFile…

Source: https://junglewise.ai/threats/cve-2021-45943-pysec-2022-43065-gdal-3-3-0-through-3-4-0-has-a-heap-based-buffer  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-01-01  
License: CC BY 4.0 with a link back

CVE-2021-45943 · Severity: low · CVSS 3.1 · Published 2022-01-01

GDAL 3.3.0 through 3.4.0 has a heap-based buffer overflow in PCIDSK::CPCIDSKFile::ReadFromFile (called from PCIDSK::CPCIDSKSegment::ReadFromFile and PCIDSK::CPCIDSKBinarySegment::CPCIDSKBinarySegment).

Technologies: [GDAL (PyPI)](https://junglewise.ai/threats/technologies/gdal). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2021-45943 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-45943 being exploited in the wild.

**How severe is CVE-2021-45943?** Low severity, with a CVSS score of 3.1, published 1 January 2022.

**Which products and versions are affected?** GDAL (PyPI) GIT:introduced=0,fixed=1ca6a3e5168c200763fa46d8aa7e698d0b757e7e|ECOSYSTEM:introduced=3.3.0,fixed=3.4.1.

**Is there a fix for CVE-2021-45943?** Yes. GDAL (PyPI): upgrade to 3.4.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-45943?** Check whether you run GDAL (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- GDAL (PyPI): upgrade to 3.4.1 or later

  ```sh
  pip install "GDAL>=3.4.1"
  ```


## Affected products

- GDAL (PyPI) GIT:introduced=0,fixed=1ca6a3e5168c200763fa46d8aa7e698d0b757e7e|ECOSYSTEM:introduced=3.3.0,fixed=3.4.1

## Identifiers

- CVE-2021-45943
- PYSEC-2022-43065

## Related threats

- [OSGeo GDAL stack buffer overflow in netCDF driver](https://junglewise.ai/threats/cve-2026-49014-osgeo-gdal-stack-buffer-overflow-in-netcdf-driver)
- [OSGeo GDAL heap buffer overflow in Grid File Handler](https://junglewise.ai/threats/cve-2026-8213-osgeo-gdal-heap-buffer-overflow-in-grid-file-handler)
- [OSGeo GDAL heap buffer overflow in SWSDfldsrch](https://junglewise.ai/threats/cve-2026-8212-osgeo-gdal-heap-buffer-overflow-in-swsdfldsrch)
- [OSGeo GDAL out-of-bounds read in GDfieldinfo](https://junglewise.ai/threats/cve-2026-8088-osgeo-gdal-out-of-bounds-read-in-gdfieldinfo)
- [OSGeo GDAL heap buffer overflow in HDF4-EOS driver](https://junglewise.ai/threats/cve-2026-8087-osgeo-gdal-heap-buffer-overflow-in-hdf4-eos-driver)
