CVE-2026-49014: GDAL ScanForGeometryContainers Vulnerability

HIGH
Advisory Identifier: GHSA-wphc-7cm7-8mf7
CVSS 7.4
CWE-121
Published
Advisory Summary

CVE-2026-49014 is a HIGH (CVSS 7.4) scanforgeometrycontainers vulnerability (CWE-121: Stack-based Buffer Overflow) affecting GDAL libraries in the PyPI ecosystem. The issue involves scanforgeometrycontainers in the netcdf driver allows code execution via a stack-based buffer overflow. Remediation is available by upgrading affected packages to version 3.13.1.

CVE-2026-49014 at a Glance

CVE Identifier CVE-2026-49014
GHSA Identifier GHSA-wphc-7cm7-8mf7
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-121: Stack-based Buffer Overflow
Affected Product GDAL
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.4

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

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
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-2026-49014

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

gdal fixed: 3.13.1
pip install gdal>=3.13.1
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 gdal

How to Check if You Are Affected

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

pip show gdal

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-121: Stack-based Buffer Overflow, where a stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). In GDAL, 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

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.

CVE-2026-49014 Affected GDAL Versions

1 component(s)
Fixed Versions:
3.13.1
Product / Package Ecosystem Affected Versions Fixed Version
gdal
PyPI
≥ 3.1.0
< 3.13.1
3.13.1

References

Frequently Asked Questions

What is CVE-2026-49014?
CVE-2026-49014 is a security vulnerability in GDAL involving scanForGeometryContainers in the netCDF driver allows code execution via a stack-based buffer overflow under CWE-121: Stack-based Buffer Overflow.
Which GDAL versions are affected?
Affected versions include releases prior to 3.13.1 across affected packages: gdal.
What version fixes CVE-2026-49014?
Upgrading to 3.13.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gdal affected?
Yes, gdal is affected in releases prior to 3.13.1. Upgrade your dependency to 3.13.1 or later.
What is the CVSS score of CVE-2026-49014?
CVE-2026-49014 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-49014?
CVE-2026-49014 is classified under CWE-121: Stack-based Buffer Overflow (A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).).
How can I check PyPI dependencies for CVE-2026-49014?
Run the dependency tree command: 'pip show gdal'. 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-wphc-7cm7-8mf7",
  "modified" : "2026-07-01T18:07:07Z",
  "published" : "2026-05-27T03:30:31Z",
  "aliases" : [ "CVE-2026-49014" ],
  "summary" : "GDAL: scanForGeometryContainers in the netCDF driver allows code execution via a stack-based buffer overflow",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "gdal"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.13.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-49014"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OSGeo/gdal/issues/14594"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OSGeo/gdal/pull/14598"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OSGeo/gdal/commit/f5ebabc1042f3c59b24e7c8ad45dda242d127f09"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OSGeo/gdal"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OSGeo/gdal/blob/v3.13.1/NEWS.md"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/gdal/PYSEC-2026-193.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-121" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-01T18:07:07Z",
    "nvd_published_at" : "2026-05-27T02:16:34Z"
  }
}