Impact
MapServer uses the PostGIS runtime filter translation function msPostGISLayerTranslateFilter() to convert filter items into PostgreSQL predicates. When the database connection type is POSTGIS and metadata such as gml_<item>_type=Integer is declared, the function treats the item as numeric but does not verify that the attacker‑controlled CGI qstring or OGC API Features featureId supplied to the query is a numeric literal. As a result, an attacker can embed arbitrary SQL fragments into the unquoted value. This allows bypass of query predicates, enumeration of unintended records, and execution of boolean‑based or time‑based SQL injection attacks that increase database load. The vulnerability does not grant a direct path to modify the database, but it can be used to extract sensitive data until a patch is applied.
Affected Systems
All installations of MapServer older than version 8.6.4 are affected. Prior releases such as 8.6.0 through 8.6.3 contain the unvalidated numeric filter logic and are susceptible to the described SQL injection. The patch is included in the 8.6.4 release and subsequent versions.
Risk and Exploitability
The CVSS score of 8.2 indicates high severity, while the EPSS score of less than 1% shows this vulnerability is thought to have low current exploitation probability. It is not listed in the CISA KEV catalog. The attack can occur remotely via any exposed query endpoint and does not require authentication, so a public or internal attacker could abuse it if they can reach the affected MapServer service.
OpenCVE Enrichment