CVE-2026-49014
Stack-Based Buffer Overflow in GDAL NetCDF Driver
Publication date: 2026-05-27
Last updated on: 2026-05-27
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| osgeo | gdal | From 3.1.0 (inc) to 3.13.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-121 | 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). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a stack-based buffer overflow in the GDAL library's netCDF driver, specifically in the function scanForGeometryContainers within the netcdfsg.cpp file.
The issue occurs because the function reads a geometry attribute into a fixed-size stack buffer without checking the length of the attribute first.
An attacker can exploit this by embedding an oversized geometry attribute in a specially crafted NetCDF file, which can cause arbitrary code execution on the server running GDAL.
How can this vulnerability impact me? :
This vulnerability can allow an attacker to execute arbitrary code on the server that processes NetCDF files using the vulnerable GDAL versions.
Such arbitrary code execution can lead to full compromise of the affected system, including data theft, data corruption, or disruption of services.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by identifying the presence of vulnerable GDAL versions (3.1.0 through 3.13.0) on your system, especially if the netCDF driver is used.
Since the exploit involves processing crafted NetCDF files with oversized geometry attributes, monitoring or scanning for suspicious NetCDF files being processed or transferred may help detect exploitation attempts.
There is no specific detection command provided, but you can check the installed GDAL version with the following command:
- gdalinfo --version
Additionally, monitoring logs for crashes or unusual behavior in applications using GDAL's netCDF driver may indicate exploitation attempts.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to update GDAL to a version where the vulnerability is fixed.
The fix involves using the helper function that validates attribute lengths with nc_inq_attlen() before reading them, preventing the stack-based buffer overflow.
If updating is not immediately possible, avoid processing untrusted or crafted NetCDF files that could contain oversized geometry attributes.
Also, consider applying any patches provided by your OS or GDAL maintainers that address this issue.