Heap buffer overflow in MapServer WMS GetLegendGraphic requests
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
MapServer from 8.2.0 before 8.6.5 contains a heap buffer overflow in its WMS GetLegendGraphic handling. Parameter arrays are not reallocated when repeated LAYER parameters are appended, so writes pass the heap allocation boundary (CWE-787). An unauthenticated remote attacker can send a single request with a nonempty BBOX to corrupt heap memory and crash the process. Code execution may be possible but was not demonstrated.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update MapServer to version 8.6.5, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA MapServer (MapServer) Fixed in 8.6.5
Timeline
- 2026-11-20 Threatist record created from CVE-2026-77326
- 2026-11-20 CISA SSVC decision points changed
- 2026-11-25 EPSS moved to the below the 50th percentile
- 2026-11-27 EPSS moved to the 50th–90th percentile
References
Other 6
- 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
More OSGeo vulnerabilities
- TI-2024-24187 Remote code execution in GeoServer via property name expressions KEVCVSS 3.1CRITICAL 9.8
- TI-2022-08629 Code generation flaw in jai-ext enables remote code execution KEVCVSS 3.1CRITICAL 10.0
- TI-2025-36149 Unauthenticated XXE in GeoServer WMS GetMap request KEVCVSS 3.1CRITICAL 9.8
- TI-2026-101125 Service security bypass in GeoServer via prefixed service names KEVCVSS 4.0HIGH 8.8
- TI-2026-101124 Unauthenticated XML injection in GeoServer WFS GetFeatureById KEVCVSS 3.1HIGH 8.6
- TI-2025-36983 MapServer - WFS XML Filter Query SQL injection CVSS 4.0HIGH 8.9
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences