{"id":"CVE-2026-54354","summary":"MapServer: PostGIS Numeric Filter Value SQL Injection in MapServer Runtime Query Translation","details":"MapServer is a system for developing web-based GIS applications. Prior to 8.6.4, MapServer's PostGIS runtime filter translation in src/mappostgis.cpp and msPostGISLayerTranslateFilter() treats a filteritem as numeric when CONNECTIONTYPE POSTGIS and metadata such as gml_\u003citem\u003e_type=Integer are configured, but it does not verify that attacker-controlled CGI qstring or OGC API Features featureId input is a numeric literal. The unquoted input is concatenated into the generated PostgreSQL/PostGIS predicate, allowing an unauthenticated remote attacker with access to an affected query endpoint to bypass predicates, enumerate unintended records, perform boolean-based or time-based SQL injection, and increase database load. The issue does not by itself establish database modification capabilities. This issue is fixed in version 8.6.4.","aliases":["GHSA-xp29-8wp5-wc3p"],"modified":"2026-09-20T14:24:13.577681Z","published":"2026-09-17T20:22:57.842Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-89"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54354.json"},"references":[{"type":"WEB","url":"https://github.com/MapServer/MapServer/releases/tag/rel-8-6-4"},{"type":"WEB","url":"https://mapserver.org/development/changelog/changelog-8-6.html#changelog-8-6"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54354.json"},{"type":"ADVISORY","url":"https://github.com/MapServer/MapServer/security/advisories/GHSA-xp29-8wp5-wc3p"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54354"},{"type":"FIX","url":"https://github.com/MapServer/MapServer/commit/65f1b53c258df2abdf6ce1f437c29e75e9976247"},{"type":"FIX","url":"https://github.com/MapServer/MapServer/commit/bd59d49779d2ecc64ca8dc1281c53231a50b698e"},{"type":"FIX","url":"https://github.com/MapServer/MapServer/pull/7516"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mapserver/mapserver","events":[{"introduced":"03bf9c1442782c4e1c413b8a03bf979177a2d160"},{"fixed":"65f1b53c258df2abdf6ce1f437c29e75e9976247"},{"fixed":"bd59d49779d2ecc64ca8dc1281c53231a50b698e"},{"fixed":"b7896ad27b553403868e2cbb2710cc4b5fdcd4c8"}],"database_specific":{"extracted_events":[{"introduced":"8.4.0"},{"fixed":"8.6.4"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54354.json","vanir_signatures_modified":"2026-09-20T14:24:13Z","vanir_signatures":[{"source":"https://github.com/mapserver/mapserver/commit/bd59d49779d2ecc64ca8dc1281c53231a50b698e","target":{"file":"src/mappostgis.cpp","function":"msPostGISLayerTranslateFilter"},"deprecated":false,"digest":{"function_hash":"21919640198858715266269917705077281424","length":6952},"id":"CVE-2026-54354-003de6c5","signature_type":"Function","signature_version":"v1"},{"target":{"file":"src/mappostgis.cpp"},"deprecated":false,"digest":{"line_hashes":["140942032694489371263620092263471853304","46250810330554396202363394228243311600","190494282828173871236755074535432126737","200033069491127039541767514037755964540"],"threshold":0.9},"id":"CVE-2026-54354-2eb1c83d","signature_type":"Line","signature_version":"v1","source":"https://github.com/mapserver/mapserver/commit/bd59d49779d2ecc64ca8dc1281c53231a50b698e"},{"target":{"file":"src/mappostgis.cpp"},"deprecated":false,"digest":{"line_hashes":["140942032694489371263620092263471853304","46250810330554396202363394228243311600","190494282828173871236755074535432126737","200033069491127039541767514037755964540"],"threshold":0.9},"id":"CVE-2026-54354-860884d3","signature_type":"Line","signature_version":"v1","source":"https://github.com/mapserver/mapserver/commit/65f1b53c258df2abdf6ce1f437c29e75e9976247"},{"id":"CVE-2026-54354-f9ddb0fb","signature_type":"Function","signature_version":"v1","source":"https://github.com/mapserver/mapserver/commit/65f1b53c258df2abdf6ce1f437c29e75e9976247","target":{"file":"src/mappostgis.cpp","function":"msPostGISLayerTranslateFilter"},"deprecated":false,"digest":{"function_hash":"21919640198858715266269917705077281424","length":6952}}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L"}]}