CVE-2026-29974 Overview
CVE-2026-29974 is a stack buffer overflow vulnerability in kosma minmea version 0.3.0, a lightweight C library for parsing NMEA 0183 sentences from GPS receivers. The flaw resides in the minmea_scan function, where the format specifier copies NMEA field data into a caller-provided buffer without accepting a size parameter. Applications that pass untrusted NMEA input to minmea_scan can trigger a stack buffer overflow [CWE-121]. Attackers exploiting this weakness can crash the host application or disrupt service availability. The vulnerability was published to the NVD on 2026-05-08 and last updated on 2026-05-12.
Critical Impact
Network-reachable applications that parse NMEA data with minmea 0.3.0 face stack corruption and denial of service.
Affected Products
- kosma minmea 0.3.0
- Applications statically or dynamically linking minmea 0.3.0
- Embedded GPS and navigation systems consuming untrusted NMEA streams via minmea
Discovery Timeline
- 2026-05-08 - CVE-2026-29974 published to NVD
- 2026-05-12 - Last updated in NVD database
Technical Details for CVE-2026-29974
Vulnerability Analysis
The minmea library parses NMEA 0183 sentences emitted by GPS hardware. The minmea_scan function provides a scanf-like parsing interface that consumers use to extract typed fields from raw sentences. The format specifier responsible for string field extraction copies the parsed NMEA field directly into a destination buffer supplied by the caller. The interface does not accept a maximum length parameter, so the copy continues until a field terminator is reached. When an attacker controls the input sentence, the copy can write past the end of a stack-allocated buffer and corrupt adjacent stack frames. The result is application crash, control-flow disruption, and potential further memory corruption depending on the calling code layout.
Root Cause
The root cause is a missing bounds check in the field-copy path of minmea_scan. Because the format specifier API mirrors scanf semantics without a width modifier, callers cannot constrain the number of bytes written. Long NMEA fields therefore overflow caller-provided stack buffers. The vulnerable code path is documented in the GitHub Code Review reference.
Attack Vector
An attacker delivers a crafted NMEA sentence containing an oversized field to any application that forwards untrusted data to minmea_scan. Delivery paths include network-attached GPS receivers, serial-over-IP bridges, telemetry feeds, and log ingestion pipelines that accept attacker-influenced NMEA streams. No authentication or user interaction is required when the input channel is exposed to a network. Successful exploitation produces a stack buffer overflow, crashing the consuming process and denying service to dependent functionality.
No verified public exploit code is available. Additional analysis is documented in the GitHub Gist Overview.
Detection Methods for CVE-2026-29974
Indicators of Compromise
- Unexpected crashes or SIGSEGV terminations in processes that link minmea 0.3.0
- NMEA sentences exceeding standard field lengths defined in NMEA 0183 (fields typically under 82 characters per sentence)
- Repeated malformed $GP* sentences arriving from a single network or serial source
Detection Strategies
- Inventory software dependencies and flag any binary or container image bundling minmea 0.3.0
- Inspect NMEA input streams for fields exceeding documented NMEA 0183 length limits
- Correlate process crash telemetry with recent inbound NMEA traffic to identify exploitation attempts
Monitoring Recommendations
- Enable core dump collection and crash reporting on services that parse GPS data
- Log NMEA sentence sources, sizes, and parse outcomes for offline analysis
- Alert on repeated parser failures originating from the same upstream device or IP
How to Mitigate CVE-2026-29974
Immediate Actions Required
- Identify every application and firmware image that links kosma minmea 0.3.0
- Restrict NMEA input sources to trusted, authenticated devices only
- Add an input length filter in front of minmea_scan to reject oversized fields before parsing
Patch Information
No official patched release is referenced in the NVD record for CVE-2026-29974 at the time of publication. Maintainer activity should be tracked at the minmea source repository. Until a fixed release is available, downstream consumers should apply a local patch that bounds the field-copy length inside the minmea_scan format specifier handler.
Workarounds
- Pre-validate every NMEA sentence and reject any field longer than 82 bytes before invoking minmea_scan
- Replace stack-allocated destination buffers with heap allocations sized to the maximum expected field length and guarded by canaries
- Isolate NMEA parsing in a sandboxed worker process so that a crash cannot impact the broader application
- Compile dependent binaries with stack protector and position-independent code to reduce exploitability of overflow conditions
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

