CVE-2026-77326
MapServer: Heap buffer overflow in WMS GetLegendGraphic via repeated LAYER parameters
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.
Fixes and workarounds
Fix
WMS support in MapServer: GitHub reports patched versions 8.6.5. Check the advisory for the affected release branch.
Source: GitHub GHSA-4mwc-qc95-5959Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| MapServer MapServer |
< 8.6.5 (affected) | CNA: GitHub_M |
WMS support in MapServerWMS support in MapServer
|
<= 8.6.4 (affected, GitHub advisory range) | GitHub GHSA-4mwc-qc95-5959 |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 8.6 high |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H | CNA: GitHub_M |
| 3.1 / 8.6 high |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H | NVD: [email protected] |
Exploit evidence
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959
exploit · ADP: CISA-ADP
References
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959CNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/MapServer/MapServer/pull/7555CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/pull/7569CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/commit/a7d5eb844a59ea076b7972a018753242f18e6f7bCNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/commit/ea1d87a6d45bbe5814a545a8b4d6a5e6b6842ea8CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5CNA: GitHub_M · x_refsource_MISC
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959ADP: CISA-ADP · exploit
- https://github.com/MapServer/MapServer/commit/a7d5eb844a59ea076b7972a018753242f18e6f7b[email protected]
- https://github.com/MapServer/MapServer/commit/ea1d87a6d45bbe5814a545a8b4d6a5e6b6842ea8[email protected]
- https://github.com/MapServer/MapServer/pull/7555[email protected]
- https://github.com/MapServer/MapServer/pull/7569[email protected]
- https://github.com/MapServer/MapServer/releases/tag/rel-8-6-5[email protected]
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959[email protected]
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959134c704f-9b21-4f2e-91b3-4a467353bcc0
- https://github.com/MapServer/MapServer/security/advisories/GHSA-4mwc-qc95-5959GitHub Security Advisories · advisory
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.