# CVE-2026-77328: MapServer: PostgreSQL JOIN second-order SQL injection in src/mappostgresql.c

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.13%, higher than 67% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-20T19:11:22.309Z
- Modified: 2026-11-25T05:18:38.493Z
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- 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.

(As written by CVE List.)

## Affected

- MapServer MapServer: < 8.6.5

## References

- <https://github.com/MapServer/MapServer/security/advisories/GHSA-m3xh-ccmh-x8rw> (exploit)
- <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>

## Sources

- CVE List: [CVE-2026-77328](https://www.cve.org/CVERecord?id=CVE-2026-77328), CVE Terms of Use, modified 2026-11-25
- NVD: [CVE-2026-77328](https://nvd.nist.gov/vuln/detail/CVE-2026-77328), Public domain, modified 2026-11-25

---

Page: https://cve.day/CVE-2026-77328 · Whole record: https://cve.day/CVE-2026-77328.json · Rebuilt by cve.day 2026-11-25T23:17:11.886Z
