CVE-2026-77328
MapServer: PostgreSQL JOIN second-order SQL injection in src/mappostgresql.c
- State
- Published
- Severity
- 6.9 Medium
- Published
- Nov 20, 2026
- Updated
- Nov 20, 2026
- Reserved
- Aug 20, 2026
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 4.0 | 6.9 Medium | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | GitHub_M |
Weaknesses
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Affected Products
| Product | Versions |
|---|---|
MapServerMapServer |
|
References
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rw
- https://github.com/MapServer/MapServer/pull/7546
- https://github.com/MapServer/MapServer/pull/7566
- https://github.com/MapServer/MapServer/commit/05babb88314b8f022eb47a3ab1a00eb37f92085f
- https://github.com/MapServer/MapServer/commit/a39a299a03a767dd966bb40caf044539e7813bce
- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.