Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| SpatiaLite | libspatialite | ≤ 5.1.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | spatialite | No fix yet | — |
| Debian 13 | spatialite | No fix yet | — |
| Debian 12 | spatialite | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | spatialite | No fix yet | — |
| Ubuntu 26.04 LTS | spatialite | No fix yet | — |
| Ubuntu 24.04 LTS | spatialite | No fix yet | — |
| Ubuntu 22.04 LTS | spatialite | No fix yet | — |
| Ubuntu 20.04 LTS | spatialite | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | spatialite | No fix yet | — |
| Ubuntu 16.04 LTS | spatialite | No fix yet | — |
| Ubuntu 14.04 LTS | spatialite | No fix yet | — |
References
- https://hackmd.io/@haindpwn/libspatialite-wkb-geometry-count-overflow third-party-advisory
- https://www.gaia-gis.it/fossil/libspatialite/file?name=src/gaiageo/gg_wkb.c&ci=5a5528e8d2 technical-description
- VulnCheck Advisory: libspatialite through 5.1.0 Uncontrolled Memory Allocation via ParseWkbPolygon Ring Count third-party-advisory