Summary
CVE-2026-77326 is an unauthenticated heap buffer overflow (CWE-787, out-of-bounds write) in MapServer’s WMS request handling. An attacker can trigger it with a WMS GetLegendGraphic request that contains repeated LAYER parameters. The CVSS v3.1 base score is 8.6 (High).
Technical details
- Root cause:
msWMSDispatch()handles synthesized parameter entries without reallocating its arrays when their capacity is exceeded. This causes an out-of-bounds heap write. - Trigger conditions: A WMS GetLegendGraphic request with repeated
LAYERparameters. - Attack vector: Network. No privileges and no user interaction are required.
- Impact: Heap memory corruption. The vendor advisory describes it as a heap buffer overflow in the WMS GetLegendGraphic handler (GHSA-4mwc-qc95-5959). Based on the CVSS vector, the rated impact is low on confidentiality, low on integrity and high on availability.
Affected software
- MapServer versions from 8.2.0 up to, but not including, 8.6.5. The vendor advisory lists 8.6.4 as affected.
Severity
- CVSS v3.1 base score: 8.6 (High)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Mitigation and recommended actions
- Immediate: Upgrade to MapServer 8.6.5 or later. The project also published a later release, 8.6.6, which it recommends.
- If you cannot patch right away, restrict network access to MapServer WMS endpoints to trusted clients. I did not find a vendor-documented workaround.

