Skip to content
OpenAdvisories
Medium · 6.9 CVE-2026-77328 EUVD-2026-131828

MapServer: PostgreSQL JOIN second-order SQL injection in src/mappostgresql.c

Published Nov 20, 2026 · Updated Nov 25, 2026 · Assigned by GitHub_M

Description

MapServer is a system for developing web-based GIS applications. Prior to 8.6.5, MapServer's PostgreSQL JOIN implementation in src/mappostgresql.c copies the source layer attribute selected by JOIN FROM into joininfo->from_value and embeds it without parameterization or escaping into a dynamically generated PostgreSQL query executed by PQexec(). When PostgreSQL JOIN support is enabled, an attacker who can control that source feature attribute can inject quote characters and SQL operators that alter the intended WHERE predicate. This second-order injection can cause unintended rows and JOIN attributes to be returned, potentially exposing information from unrelated PostgreSQL records. This issue is fixed in version 8.6.5.

Affected products

VendorProductAffectedFixed
MapServer MapServer < 8.6.5 —

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.

ReleasePackageFixed inAdvisory
Debian 14 mapserver 8.6.5-1 —
Debian 13 mapserver No fix yet —
Debian 12 mapserver 8.0.0-3+deb12u2 DLA-4935-1
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS mapserver No fix yet —
Ubuntu 24.04 LTS mapserver No fix yet —
Ubuntu 22.04 LTS mapserver No fix yet —
Ubuntu 20.04 LTS mapserver No fix yet —
Ubuntu 18.04 LTS mapserver No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS mapserver No fix yet —

Advisories 1

References