CVE-2025-66308: Getgrav/grav Cross-Site Scripting Vulnerability
MODERATECVE-2025-66308 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Getgrav/grav libraries in the Packagist ecosystem. The issue involves grav admin plugin vulnerable to cross-site scripting (xss) stored endpoint `/admin/config/site` parameter `data[taxonomies]`. Remediation is available by upgrading affected packages to version 1.8.0-beta.27.
CVE-2025-66308 at a Glance
How to Fix CVE-2025-66308
To remediate this vulnerability, upgrade all affected Getgrav/grav dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getgrav/grav to 1.8.0-beta.27
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getgrav/grav
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-66308, inspect your project dependencies for Getgrav/grav:
inspect dependencies for getgrav/grav
Analyze the terminal output to locate any version of Getgrav/grav in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.0-beta.27), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Getgrav/grav, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66308 Affected Getgrav/grav Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getgrav/grav
|
Packagist |
< 1.8.0-beta.27
|
1.8.0-beta.27
|
References
Frequently Asked Questions
What is CVE-2025-66308?
Which Getgrav/grav versions are affected?
What version fixes CVE-2025-66308?
Is getgrav/grav affected?
What CWE is associated with CVE-2025-66308?
How can I check Packagist dependencies for CVE-2025-66308?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gqxx-248x-g29f",
"modified" : "2025-12-02T01:23:19Z",
"published" : "2025-12-02T01:23:19Z",
"aliases" : [ "CVE-2025-66308" ],
"summary" : "Grav Admin Plugin vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/config/site` parameter `data[taxonomies]`",
"details" : "## Summary\n\nA Stored Cross-Site Scripting (XSS) vulnerability was identified in the `/admin/config/site` endpoint of the _Grav_ application. This vulnerability allows attackers to inject malicious scripts into the `data[taxonomies]` parameter. The injected payload is stored on the server and automatically executed in the browser of any user who accesses the affected site configuration, resulting in a persistent attack vector.\n\n---\n\n## Details\n\n**Vulnerable Endpoint:** `POST /admin/config/site` \n**Parameter:** `data[taxonomies]`\n\nThe application does not properly validate or sanitize input in the `data[taxonomies]` field. As a result, an attacker can inject JavaScript code, which is stored in the site configuration and later rendered in the administrative interface or site output, causing automatic execution in the user's browser.\n\n---\n\n## PoC\n\n**Payload:**\n\n`\"><script>alert('XSS-PoC')</script>`\n\n### Steps to Reproduce:\n\n1. Log in to the _Grav_ Admin Panel with sufficient permissions to modify site configuration.\n \n2. Navigate to **Configuration > Site**.\n \n3. In the **Taxonomies Types** field (which maps to `data[taxonomies]`), insert the payload above:\n \n `\"><script>alert('XSS-PoC')</script>`\n \n4. Save the configuration.\n\n<img width=\"1897\" height=\"628\" alt=\"Pasted image 20250718195942\" src=\"https://github.com/user-attachments/assets/2035fcaa-34fc-494c-a7ca-7c1e1f34b057\" />\n \n5. Go on Pages and click on one of them\n\n<img width=\"932\" height=\"587\" alt=\"Pasted image 20250718200306\" src=\"https://github.com/user-attachments/assets/3c1995ba-2581-4e27-ae9d-a17e2eeb5b57\" />\n \n6. The stored payload is executed immediately in the browser, confirming the Stored XSS vulnerability.\n\n<img width=\"1204\" height=\"377\" alt=\"Pasted image 20250718200353\" src=\"https://github.com/user-attachments/assets/ad8ea7ea-603f-4b84-aa5a-120de0cb56ce\" />\n \n7. The HTTP request submitted during this process contains the vulnerable parameter and payload:\n \n<img width=\"757\" height=\"675\" alt=\"Pasted image 20250718200445\" src=\"https://github.com/user-attachments/assets/fbbe2b76-00eb-4426-8ddd-5cde2cc65d77\" />\n\n---\n\n## Impact\n\nStored XSS attacks can lead to severe consequences, including:\n\n- **Session hijacking:** Stealing cookies or authentication tokens to impersonate users\n \n- **Credential theft:** Harvesting usernames and passwords using malicious scripts\n \n- **Malware delivery:** Distributing unwanted or harmful code to victims\n \n- **Privilege escalation:** Compromising administrative users through persistent scripts\n \n- **Data manipulation or defacement:** Changing or disrupting site content\n \n- **Reputation damage:** Eroding trust among site users and administrators\n \n\n---\n\n## Discoverer\n\n[Marcelo Queiroz](www.linkedin.com/in/marceloqueirozjr) \n\nby [CVE-Hunters](https://github.com/Sec-Dojo-Cyber-House/cve-hunters)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:A/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getgrav/grav"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.0-beta.27"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/security/advisories/GHSA-gqxx-248x-g29f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66308"
}, {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav-plugin-admin/commit/99f653296504f1d6408510dd2f6f20a45a26f9b0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getgrav/grav"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-02T01:23:19Z",
"nvd_published_at" : "2025-12-01T22:15:50Z"
}
}