# CVE-2026-8213: OSGeo GDAL heap buffer overflow in Grid File Handler

Source: https://junglewise.ai/threats/cve-2026-8213-osgeo-gdal-heap-buffer-overflow-in-grid-file-handler  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-09. Updated: 2026-05-19  
License: CC BY 4.0 with a link back

CVE-2026-8213 · Severity: medium · CVSS 5.3 · Published 2026-05-09

OSGeo GDAL is a widely used library for processing geospatial data formats. A vulnerability in its HDF4-EOS grid file handler allows a local attacker to crash applications that use the library by providing a specially crafted data file. This could lead to a denial-of-service (DoS) condition, impacting the availability of systems processing geographic information.

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

## Quick answers

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

**How severe is CVE-2026-8213?** Medium severity, with a CVSS score of 5.3, published 9 May 2026.

**Which products and versions are affected?** GDAL (PyPI) ECOSYSTEM:introduced=0,fixed=3.13.0.

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

**How is CVE-2026-8213 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-8213?** 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.13.0 or later

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


## Technical details

A vulnerability exists in the GDSDfldsrch function within frmts/hdf4/hdf-eos/GDapi.c of OSGeo GDAL. The issue stems from an integer underflow when stripping quotes from a metadata-derived string. Specifically, the code calls memmove(name, name + 1, strlen(name) - 2) without verifying that the string length is at least 2. If the 'FieldList' metadata value is empty, the unsigned subtraction results in a massive value (SIZE_MAX-1), leading to an out-of-bounds read/write and a subsequent crash (SIGSEGV). This can be triggered locally via tools like gdalmdiminfo when processing a crafted HDF-EOS grid file. The issue is fixed in version 3.13.0RC1.

## Affected products

- OSGeo gdal up to 3.13.0dev-4

## Identifiers

- CVE-2026-8213
- PYSEC-2026-2157

## Timeline

- 2026-04-20: disclosed: Issue reported on GitHub
- 2026-05-04: patched: Version 3.13.0RC1 released
- 2026-05-09: advisory: CVE-2026-8213 published

## References

- [https://github.com/OSGeo/gdal/](https://github.com/OSGeo/gdal/)
- [https://github.com/OSGeo/gdal/commit/3e04c0385630e4d42517046d9a4967dfccfeb7fd](https://github.com/OSGeo/gdal/commit/3e04c0385630e4d42517046d9a4967dfccfeb7fd)
- [https://github.com/OSGeo/gdal/issues/14399](https://github.com/OSGeo/gdal/issues/14399)
- [https://github.com/OSGeo/gdal/releases/tag/v3.13.0RC1](https://github.com/OSGeo/gdal/releases/tag/v3.13.0RC1)
- [https://github.com/biniamf/pocs/tree/main/gdal-gdsdfldsrch_oob-read](https://github.com/biniamf/pocs/tree/main/gdal-gdsdfldsrch_oob-read)
- [https://vuldb.com/submit/808128](https://vuldb.com/submit/808128)
- [https://vuldb.com/vuln/362430](https://vuldb.com/vuln/362430)

## 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 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)
- [A vulnerability was identified in OSGeo gdal up to 3.13.0dev-4. This issue affects the function SWnentries of the file…](https://junglewise.ai/threats/cve-2026-8086-pysec-2026-2154-a-vulnerability-was-identified-in-osgeo-gdal-up-to)
