CVE-2025-66312: Getgrav/grav Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-rmw5-f87r-w988
CWE-79
Published
Advisory Summary

CVE-2025-66312 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 is vulnerable to cross-site scripting (xss) stored endpoint `/admin/accounts/groups/[group]` parameter `data[readablename]`. Remediation is available by upgrading affected packages to version 1.8.0-beta.27.

CVE-2025-66312 at a Glance

CVE Identifier CVE-2025-66312
GHSA Identifier GHSA-rmw5-f87r-w988
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Getgrav/grav
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2025-66312

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.

getgrav/grav fixed: 1.8.0-beta.27
Upgrade getgrav/grav to 1.8.0-beta.27
Verify Direct and Transitive Dependencies

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-66312, 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

## Summary A Stored Cross-Site Scripting (XSS) vulnerability was identified in the `/admin/accounts/groups/Grupo` endpoint of the _Grav_ application. This vulnerability allows attackers to inject malicious scripts into the `data[readableName]` parameter. The injected scripts are stored on the server and executed automatically whenever the affected page is accessed by users, posing a significant security risk. --- ## Details **Vulnerable Endpoint:** `POST /admin/accounts/groups/Grupo` **Parameter:** `data[readableName]` The application fails to properly validate and sanitize user input in the `data[readableName]` parameter. This lack of input handling allows attackers to inject arbitrary script content that is stored in the application and executed in the browser of any user who views the affected group configuration. --- ## PoC **Payload:** `<ScRipT>alert('PoC-XSS')</ScRipT>` 1. Navigate to **Accounts > Groups** in the administrative panel. 2. Create a new group or edit an existing one. 3. In the **Display Name** field (`data[readableName]`), insert the payload above and save the changes. ![image](https://github.com/user-attachments/assets/e6db531e-9968-4fc5-8329-12183975096c) The following HTTP request was generated during this action: ![image](https://github.com/user-attachments/assets/37e9a2c6-f7be-45b4-8aaf-13e64940561f) 4. Next, go to **Accounts > Users** and open any user profile. ![image](https://github.com/user-attachments/assets/a09215ab-17a2-4b17-9b58-cf3737d95ba2) 5. The malicious script is executed immediately in the browser when the page loads, confirming the existence of a **Stored XSS** vulnerability. ![image](https://github.com/user-attachments/assets/8411ca04-4d84-4f88-9c6a-7dd88e65a6e0) --- ## Impact Stored XSS vulnerabilities can result in serious consequences, including: - **Session hijacking:** Attackers can steal authentication cookies or tokens - **Malware delivery:** Inserting scripts that download malicious content - **Credential theft:** Capturing usernames and passwords through injected forms - **Sensitive data exposure:** Accessing data stored in the browser or the application - **Browser takeover:** Executing arbitrary commands in the user’s session - **Phishing attacks:** Redirecting users to fake login or malicious sites - **Website defacement:** Altering page content shown to users - **Reputational damage:** Undermining trust in the platform or organization by [CVE-Hunters](https://github.com/Sec-Dojo-Cyber-House/cve-hunters)

CVE-2025-66312 Affected Getgrav/grav Versions

1 component(s)
Fixed Versions:
1.8.0-beta.27
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-66312?
CVE-2025-66312 is a security vulnerability in Getgrav/grav involving Grav Admin Plugin is vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/accounts/groups/[group]` parameter `data[readableName]` under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Getgrav/grav versions are affected?
Affected versions include releases prior to 1.8.0-beta.27 across affected packages: getgrav/grav.
What version fixes CVE-2025-66312?
Upgrading to 1.8.0-beta.27 (or the latest patched release for your respective branch) resolves the vulnerability.
Is getgrav/grav affected?
Yes, getgrav/grav is affected in releases prior to 1.8.0-beta.27. Upgrade your dependency to 1.8.0-beta.27 or later.
What CWE is associated with CVE-2025-66312?
CVE-2025-66312 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check Packagist dependencies for CVE-2025-66312?
Run the dependency tree command: 'inspect dependencies for getgrav/grav'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rmw5-f87r-w988",
  "modified" : "2025-12-02T00:37:38Z",
  "published" : "2025-12-02T00:37:38Z",
  "aliases" : [ "CVE-2025-66312" ],
  "summary" : "Grav Admin Plugin is vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/accounts/groups/[group]` parameter `data[readableName]`",
  "details" : "## Summary\n\nA Stored Cross-Site Scripting (XSS) vulnerability was identified in the `/admin/accounts/groups/Grupo` endpoint of the _Grav_ application. This vulnerability allows attackers to inject malicious scripts into the `data[readableName]` parameter. The injected scripts are stored on the server and executed automatically whenever the affected page is accessed by users, posing a significant security risk.\n\n---\n\n## Details\n\n**Vulnerable Endpoint:** `POST /admin/accounts/groups/Grupo`  \n**Parameter:** `data[readableName]`\n\nThe application fails to properly validate and sanitize user input in the `data[readableName]` parameter. This lack of input handling allows attackers to inject arbitrary script content that is stored in the application and executed in the browser of any user who views the affected group configuration.\n\n---\n\n## PoC\n\n**Payload:**\n\n`<ScRipT>alert('PoC-XSS')</ScRipT>`\n\n1. Navigate to **Accounts > Groups** in the administrative panel.\n    \n2. Create a new group or edit an existing one.\n    \n3. In the **Display Name** field (`data[readableName]`), insert the payload above and save the changes.\n\n![image](https://github.com/user-attachments/assets/e6db531e-9968-4fc5-8329-12183975096c)\n\n\nThe following HTTP request was generated during this action:\n![image](https://github.com/user-attachments/assets/37e9a2c6-f7be-45b4-8aaf-13e64940561f)\n\n\n4. Next, go to **Accounts > Users** and open any user profile.\n\n![image](https://github.com/user-attachments/assets/a09215ab-17a2-4b17-9b58-cf3737d95ba2)\n\n\n5. The malicious script is executed immediately in the browser when the page loads, confirming the existence of a **Stored XSS** vulnerability.\n\n![image](https://github.com/user-attachments/assets/8411ca04-4d84-4f88-9c6a-7dd88e65a6e0)\n\n\n---\n\n## Impact\n\nStored XSS vulnerabilities can result in serious consequences, including:\n\n- **Session hijacking:** Attackers can steal authentication cookies or tokens\n    \n- **Malware delivery:** Inserting scripts that download malicious content\n    \n- **Credential theft:** Capturing usernames and passwords through injected forms\n    \n- **Sensitive data exposure:** Accessing data stored in the browser or the application\n    \n- **Browser takeover:** Executing arbitrary commands in the user’s session\n    \n- **Phishing attacks:** Redirecting users to fake login or malicious sites\n    \n- **Website defacement:** Altering page content shown to users\n    \n- **Reputational damage:** Undermining trust in the platform or organization\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:N/PR:H/UI:A/VC:L/VI:L/VA:N/SC:H/SI:H/SA:H"
  } ],
  "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-rmw5-f87r-w988"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66312"
  }, {
    "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-02T00:37:38Z",
    "nvd_published_at" : "2025-12-01T22:15:51Z"
  }
}