{"id":"CVE-2025-66310","aliases":["CVE-2025-66310","GHSA-7g78-5g5g-mvfj"],"related":[],"kind":"vulnerability","state":"published","title":"Grav vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/pages/[page]` parameter `data[header][template]` in Advanced Tab","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA 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.\n\n---\n\n## Details\n\n**Vulnerable Endpoint:** `POST /admin/pages/[page]`  \n**Parameter:** `data[header][template]`\n\nThe application fails to properly sanitize user input in the `data[header][template]` field, which is stored in the YAML frontmatter of the page. An attacker can inject JavaScript code using this field, and the payload is rendered and executed when the page is accessed, especially within the Admin Panel interface.\n\n---\n\n## PoC\n\n**Payload:**\n\n`<script>alert('PoC-XXS73')</script>`\n\n### Steps to Reproduce:\n\n1. Log in to the _Grav_ Admin Panel and navigate to **Pages**.\n    \n2. Create a new page or edit an existing one.\n    \n3. In the **Advanced > Template** field (which maps to `data[header][template]`), insert the payload:\n![image](https://github.com/user-attachments/assets/fc92aa09-e363-4422-b577-63aa27097886)\n\n4. Save the page.\n    \n5. Return to the **Pages** section and click on the **three-dot menu** of the affected page: \n![image](https://github.com/user-attachments/assets/ea6a023b-f838-4700-b2a8-8dcfbca37f00)\n\n6. The stored XSS payload is triggered, and the script is executed in the browser:\n![image](https://github.com/user-attachments/assets/8cf1cca5-ce8f-4b09-a57c-0848090918ac)\n---\n\n## Impact\n\nStored XSS vulnerabilities can have serious consequences, including:\n\n- **Session hijacking:** Capturing admin session cookies or tokens\n    \n- **Malware delivery:** Executing scripts that load malicious resources\n    \n- **Credential theft:** Creating fake login prompts to steal usernames/passwords\n    \n- **Data exposure:** Reading sensitive metadata or page contents\n    \n- **Privilege escalation:** Performing actions as an authenticated user\n    \n- **Website defacement:** Altering visual or functional elements of the site\n    \n- **Reputation damage:** Undermining user trust in the application\n\nby [CVE-Hunters](https://github.com/Sec-Dojo-Cyber-House/cve-hunters)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-12-01T22:04:09.187Z","modified":"2026-09-10T03:50:31.731Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 1.11.0-beta.1","status":"affected"}],"vendor":"getgrav","product":"grav","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.8.0-beta.27"}],"ecosystem":"Packagist","package":"getgrav/grav","purl":"pkg:composer/getgrav/grav","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"1.10.50"}],"vendor":"getgrav","product":"grav-plugin-admin","cpe":"cpe:2.3:a:getgrav:grav-plugin-admin:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-7g78-5g5g-mvfj","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/getgrav/grav-plugin-admin/commit/99f653296504f1d6408510dd2f6f20a45a26f9b0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66310","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/getgrav/grav","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-12-02T16:03:09.485Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66310","url":"https://www.cve.org/CVERecord?id=CVE-2025-66310","licence":"CVE Terms of Use","modified":"2025-12-02T16:03:14.853Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7g78-5g5g-mvfj","url":"https://github.com/advisories/GHSA-7g78-5g5g-mvfj","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:31.731Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66310","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66310","licence":"Public domain","modified":"2026-06-17T09:56:39.437Z"}],"updatedAt":"2026-11-25T22:59:08.149Z","epss":{"score":0.00229,"percentile":0.14679,"date":"2026-12-01T12:00:22.000Z"}}