CVE-2026-77328
MapServer: PostgreSQL JOIN second-order SQL injection in src/mappostgresql.c
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.
Fixes and workarounds
Fix
MapServer JOIN with PostgreSQL: GitHub reports patched versions 8.6.5. Check the advisory for the affected release branch.
Source: GitHub GHSA-m3xh-ccmh-x8rwAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| MapServer MapServer |
< 8.6.5 (affected) | CNA: GitHub_M |
MapServer JOIN with PostgreSQLMapServer JOIN with PostgreSQL
|
<= 8.6.4 (affected, GitHub advisory range) | GitHub GHSA-m3xh-ccmh-x8rw |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 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 | CNA: GitHub_M |
| 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD: [email protected] |
Exploit evidence
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rw
exploit · ADP: CISA-ADP
References
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rwCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/MapServer/MapServer/pull/7546CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/pull/7566CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/commit/05babb88314b8f022eb47a3ab1a00eb37f92085fCNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/commit/a39a299a03a767dd966bb40caf044539e7813bceCNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rwADP: CISA-ADP · exploit
- https://github.com/MapServer/MapServer/commit/05babb88314b8f022eb47a3ab1a00eb37f92085f[email protected]
- https://github.com/MapServer/MapServer/commit/a39a299a03a767dd966bb40caf044539e7813bce[email protected]
- https://github.com/MapServer/MapServer/pull/7546[email protected]
- https://github.com/MapServer/MapServer/pull/7566[email protected]
- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5[email protected]
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rw[email protected]
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rw134c704f-9b21-4f2e-91b3-4a467353bcc0
- https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rwGitHub Security Advisories · advisory
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.