---
id: "CVE-2026-112048"
kind: "vulnerability"
aliases: ["CVE-2026-112048"]
title: "libspatialite: unchecked polygon ring count lets crafted geometry crash or corrupt memory"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["32-bit", "gis", "libspatialite", "package", "spatialite"]
not_affected_if: ["trusted-input-only"]
published_at: "2026-10-18T13:16:36+00:00"
first_seen_at: "2026-10-23T21:57:15+00:00"
updated_at: "2026-10-25T03:40:59+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112048", "first_seen_at": "2026-10-23T21:57:15+00:00"}]
---

# libspatialite: unchecked polygon ring count lets crafted geometry crash or corrupt memory

libspatialite through 5.1.0 does not validate the ring count when parsing WKB polygons, so a crafted geometry BLOB triggers uncontrolled interior-ring allocation. An attacker who supplies such a polygon to a SpatiaLite database or ST_GeomFromWKB can crash the process or corrupt heap memory on 32-bit builds.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `spatialite --version` or check the installed libspatialite version in your package manager, and compare it to `5.1.0`.
- Check whether the application passes untrusted geometry (WKB BLOBs or ST_GeomFromWKB input) into SpatiaLite.
- Check whether the build is 32-bit.

## Fix

- Upgrade libspatialite past `5.1.0` to a release that contains the fix (unknown exact version in sources).
- Until patched, reject or validate untrusted WKB input before it reaches SpatiaLite.

## Timeline

- 2026-10-23T21:57:15+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112048

## From the sources

libspatialite through 5.1.0 fails to validate the polygon ring count in ParseWkbPolygon, allowing attackers to trigger uncontrolled interior-ring allocation via crafted geometry BLOBs. Attackers can supply a crafted polygon in a SpatiaLite database or ST_GeomFromWKB input to crash the process or corrupt heap memory on 32-bit builds.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
