# CVE-2026-77327: MapServer: MySQL JOIN second-order SQL injection in src/mapjoin.c

Status: published. Published: 2026-11-20. Updated: 2026-11-24.

MapServer is a system for developing web-based GIS applications. Prior to 8.6.5, MapServer's MySQL JOIN implementation in src/mapjoin.c copies the source layer attribute selected by JOIN ... FROM into joininfo->target and inserts it into the query built by msMySQLJoinNext() without parameterization or SQL escaping. When MySQL JOIN support is enabled, an attacker who can control that source feature attribute, including through imported shapefile or DBF data or another untrusted spatial source, can inject SQL operators or expressions that change the intended JOIN predicate. This can bypass the intended key comparison and expose unrelated records from the MySQL or MariaDB JOIN table through output templates, query responses, or downstream application logic. This issue is fixed in version 8.6.5.

## Remediation

- fix: MapServer JOIN with MySQL: GitHub reports patched versions 8.6.5. Check the advisory for the affected release branch. (source: GitHub GHSA-7624-4mwh-9cxr) — https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr

## Affected products and versions

- MapServer / MapServer: < 8.6.5 (affected). Source: CNA: GitHub_M
-  / MapServer JOIN with MySQL (MapServer JOIN with MySQL): <= 8.6.4 (affected, GitHub advisory range). Source: GitHub GHSA-7624-4mwh-9cxr

## Severity and prioritization

- CVSS 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; source: CNA: GitHub_M

- CVSS 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; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 1.18% as of 2026-11-23; percentile 68.55%

- SSVC: exploitation poc; automatable yes; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-89

## Exploit evidence

- exploit: https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr (ADP: CISA-ADP)

## References

- https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/MapServer/MapServer/pull/7547 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/MapServer/MapServer/pull/7567 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/MapServer/MapServer/commit/b1aa22b1ea4ba4293c0fddea92e01ce0dc18a300 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/MapServer/MapServer/commit/f4f95059e2610d431e0b46d75d713cd52b84f64c (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr (ADP: CISA-ADP; exploit)

- https://github.com/MapServer/MapServer/commit/b1aa22b1ea4ba4293c0fddea92e01ce0dc18a300 (security-advisories@github.com)

- https://github.com/MapServer/MapServer/commit/f4f95059e2610d431e0b46d75d713cd52b84f64c (security-advisories@github.com)

- https://github.com/MapServer/MapServer/pull/7547 (security-advisories@github.com)

- https://github.com/MapServer/MapServer/pull/7567 (security-advisories@github.com)

- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5 (security-advisories@github.com)

- https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr (security-advisories@github.com)

- https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr (134c704f-9b21-4f2e-91b3-4a467353bcc0)

- https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr (GitHub Security Advisories; advisory)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-77327; retrieved 2026-11-20; source updated 2026-11-20

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-77327; retrieved 2026-11-24; source updated 2026-11-24

- GitHub Security Advisories: https://github.com/MapServer/MapServer/security/advisories/GHSA-7624-4mwh-9cxr; retrieved 2026-11-22; source updated 2026-08-20

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-77327; retrieved 2026-11-24; source updated Not reported

Revision: f44fc3b884681bbc0a942eb7c09cf4288e2384a660096dd4cc45194299dd1cda

Canonical: https://y2.dev/cve/CVE-2026-77327

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.