Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112052 Overview
CVE-2026-112052 is an integer overflow vulnerability [CWE-190] in libspatialite through version 5.1.0. The flaw resides in the Well-Known Binary (WKB) point and vertex count size guard within ParseWkbLine and related parsers in gg_wkb.c. A crafted geometry Binary Large Object (BLOB) with an inflated point count bypasses the size check and triggers an out-of-bounds read. On 32-bit builds, the overflow can corrupt heap memory, while 64-bit builds typically crash the process. Attackers deliver the payload through a malicious SpatiaLite database file processed by an application linked against the vulnerable library.
Critical Impact
A crafted SpatiaLite database can crash applications that parse WKB geometries and may corrupt heap memory on 32-bit builds, enabling denial of service and potential memory tampering.
Affected Products
- libspatialite versions up to and including 5.1.0
- Applications and GIS tools statically or dynamically linked against vulnerable libspatialite builds
- 32-bit builds are particularly exposed to heap corruption; 64-bit builds are exposed to process crashes
Discovery Timeline
- 2026-10-18 - CVE-2026-112052 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112052
Vulnerability Analysis
The vulnerability lives in libspatialite's WKB parsing path, specifically in ParseWkbLine and related functions in src/gaiageo/gg_wkb.c. These parsers read a 32-bit point count from an untrusted geometry BLOB and multiply it by the size of a coordinate structure to validate the buffer length. The multiplication wraps around when the attacker-supplied point count is sufficiently large. The wrapped value satisfies the size guard, so the parser proceeds to iterate across the declared points. Each iteration reads coordinate data beyond the end of the allocated buffer, producing an out-of-bounds read.
Root Cause
The root cause is an unchecked arithmetic operation on untrusted input, classified as an integer overflow [CWE-190]. The size guard assumes the product of the point count and coordinate size cannot exceed the buffer length. It does not verify that the multiplication itself fits within the integer type used for comparison. On 32-bit platforms the wrap also affects subsequent allocation sizing, which is why heap corruption becomes reachable rather than only a read-past-the-end crash.
Attack Vector
Exploitation requires an application to open or query a SpatiaLite database file supplied by the attacker, which satisfies local attack vector and user interaction requirements. The attacker crafts a geometry BLOB with an oversized point count encoded in the WKB header. When the host application invokes a parser such as ParseWkbLine against that BLOB, the guarded multiplication overflows and the parser dereferences memory past the allocation. See the VulnCheck Advisory on Integer Overflow and the HackMD Geometry Count Overflow Analysis for parser-level technical details, and the Gaia GIS Source Code File for the vulnerable code path.
// No verified exploit code is published for CVE-2026-112052.
// Refer to the HackMD and VulnCheck analyses linked above for parser-level details.
Detection Methods for CVE-2026-112052
Indicators of Compromise
- Unexpected crashes or SIGSEGV events in processes that load libspatialite or applications such as GIS tools and SQLite extensions handling .sqlite or .db files containing geometry columns
- SpatiaLite database files received from untrusted sources containing abnormally large declared point counts in WKB geometry BLOBs
- Heap corruption indicators from 32-bit processes shortly after reading geometry data
Detection Strategies
- Inventory applications linking against libspatialite and identify versions at or below 5.1.0 using software composition analysis
- Inspect SpatiaLite BLOBs for declared point counts that exceed plausible geometry sizes relative to the BLOB length
- Enable AddressSanitizer or equivalent runtime instrumentation in test environments to surface out-of-bounds reads during ingestion of untrusted geometry data
Monitoring Recommendations
- Monitor crash telemetry and core dumps for processes that parse SpatiaLite databases
- Alert on file write or import events where user-supplied .sqlite files are loaded by server-side GIS or ETL processes
- Track package inventory changes to confirm libspatialite upgrades across Linux, macOS, and Windows build pipelines
How to Mitigate CVE-2026-112052
Immediate Actions Required
- Treat all SpatiaLite database files from untrusted sources as hostile until the host application is patched
- Restrict ingestion of .sqlite and .db geometry files to vetted sources and dedicated processing accounts
- Prioritize remediation on 32-bit builds, where the overflow can escalate from out-of-bounds read to heap corruption
Patch Information
No fixed version is identified in the NVD record at the time of publication. Monitor the Gaia GIS Source Code File repository and the VulnCheck Advisory on Integer Overflow for updated builds that add overflow-safe size validation in ParseWkbLine and related WKB parsers. Rebuild downstream applications once a corrected libspatialite release becomes available.
Workarounds
- Prefer 64-bit builds of libspatialite to reduce exposure from heap corruption, while recognizing that process crashes remain possible
- Validate WKB BLOBs before parsing by rejecting geometries whose declared point count multiplied by coordinate size exceeds the BLOB length
- Sandbox GIS ingestion workloads using seccomp, AppArmor, or containers with minimal privileges to limit the impact of a crash or memory corruption
# Example: identify installed libspatialite versions on Debian/Ubuntu systems
dpkg -l | grep -i spatialite
# Example: identify installed libspatialite versions on RHEL/Fedora systems
rpm -qa | grep -i spatialite
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

