# CVE-2026-77326: MapServer: Heap buffer overflow in WMS GetLegendGraphic via repeated LAYER parameters

- Severity: High 8.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H`
- 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): 0.96%, higher than 62% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-20T19:09:20.128Z
- Modified: 2026-11-24T17:54:52.597Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

MapServer is a system for developing web-based GIS applications. From 8.2.0 until 8.6.5, an unauthenticated attacker can send a WMS GetLegendGraphic request with a nonempty BBOX and repeated LAYER parameters to trigger a heap buffer overflow in msWMSDispatch() in src/mapwms.cpp. The handler appends synthesized entries to cgiRequestObj.ParamNames and cgiRequestObj.ParamValues at NumParams without retaining the arrays' capacity or reallocating them, while incrementing NumParams inside the loop. Once the parser's hidden capacity is exhausted, the writes pass the heap allocation boundary. A single request can corrupt heap memory and crash the process; code execution may be possible but was not demonstrated. 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-4mwc-qc95-5959> (exploit)
- <https://github.com/MapServer/MapServer/pull/7555>
- <https://github.com/MapServer/MapServer/pull/7569>
- <https://github.com/MapServer/MapServer/commit/a7d5eb844a59ea076b7972a018753242f18e6f7b>
- <https://github.com/MapServer/MapServer/commit/ea1d87a6d45bbe5814a545a8b4d6a5e6b6842ea8>
- <https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5>

## Sources

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

---

Page: https://cve.day/CVE-2026-77326 · Whole record: https://cve.day/CVE-2026-77326.json · Rebuilt by cve.day 2026-11-25T22:59:52.458Z
