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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| MapServer | MapServer | < 8.6.5 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | mapserver | 8.6.5-1 | — |
| Debian 13 | mapserver | No fix yet | — |
| Debian 12 | mapserver | 8.0.0-3+deb12u2 | DLA-4935-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | mapserver | No fix yet | — |
| Ubuntu 24.04 LTS | mapserver | No fix yet | — |
| Ubuntu 22.04 LTS | mapserver | No fix yet | — |
| Ubuntu 20.04 LTS | mapserver | No fix yet | — |
| Ubuntu 18.04 LTS | mapserver | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | mapserver | No fix yet | — |
Advisories 1
- DLA-4935-1 mapserver - security update Debian Security (DSA / DLA) · Nov 25, 2026
References
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959
- 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