CVE-2026-49014

Stack-Based Buffer Overflow in GDAL NetCDF Driver Allows Arbitrary Code Execution

Published May 27, 2026 CVSS 3.1 · 7.4 High EPSS < 1% KEV · Not listed
Description
In GDAL 3.1.0 through 3.13.0, scanForGeometryContainers in the netCDF driver allows code execution via a stack-based buffer overflow. It reads a geometry attribute into a fixed-size stack buffer without validating the attribute length. The attacker embeds the exploit as an oversized geometry attribute in a crafted NetCDF file. This achieves arbitrary code execution on the server running GDAL. This is in frmts/netcdf/netcdfsg.cpp.

Analysis

AI-generated

Technical impact

The vulnerability originates from the netCDF driver’s scanForGeometryContainers function, which copies a geometry attribute into a fixed-size stack buffer without validating the size, enabling a stack-based buffer overflow. This weakness (CWE-121) permits an attacker to inject code by crafting an oversized geometry attribute, resulting in arbitrary code execution on the system running GDAL.

Affected Systems

GDAL 3.1.0 through 3.13.0, inclusive, are affected. These versions are susceptible to the overflow described above and are issued by the GDAL project.

Risk and Exploitability

With a CVSS score of 7.4 the vulnerability is high severity. EPSS data is unavailable, and the issue is not listed in the CISA KEV catalog, suggesting limited public exploitation yet retaining a significant risk if an attacker can supply a malicious NetCDF file to the target. The attack vector, inferred from the description, is that any process using GDAL to read NetCDF data could be hijacked by an attacker who can supply such a file.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GDAL to version 3.14.0 or later to remove the vulnerable code path.
  • If an upgrade cannot be performed immediately, reject or sanitize untrusted NetCDF files and enforce strict access controls so only privileged users can provide input to GDAL.
  • Apply alternative input validation or bounds checking in custom code that processes NetCDF geometries to guard against overflow conditions.

Generated by OpenCVE AI on May 27, 2026 at 03:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-wphc-7cm7-8mf7 GDAL: scanForGeometryContainers in the netCDF driver allows code execution via a stack-based buffer overflow
References
History
Type Values Removed Values Added
First Time appeared Osgeo
Osgeo gdal
CPEs cpe:2.3:a:osgeo:gdal:*:*:*:*:*:*:*:*
Vendors & Products Osgeo
Osgeo gdal
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Stack-Based Buffer Overflow in GDAL NetCDF Driver Allows Arbitrary Code Execution
Type Values Removed Values Added
Description In GDAL 3.1.0 through 3.13.0, scanForGeometryContainers in the netCDF driver allows code execution via a stack-based buffer overflow. It reads a geometry attribute into a fixed-size stack buffer without validating the attribute length. The attacker embeds the exploit as an oversized geometry attribute in a crafted NetCDF file. This achieves arbitrary code execution on the server running GDAL. This is in frmts/netcdf/netcdfsg.cpp.
First Time appeared Gdal
Gdal gdal
Weaknesses CWE-121
CPEs cpe:2.3:a:gdal:gdal:*:*:*:*:*:*:*:*
Vendors & Products Gdal
Gdal gdal
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
May 27, 2026, 1:52 PM
Reserved
May 27, 2026, 1:39 AM
Status
Analyzed
Published
May 27, 2026, 2:16 AM
Modified
Jul 24, 2026, 12:10 PM