CVE-2025-66300: Getgrav/grav Grav Is Vulnerable To Arbitrary Vulnerability

HIGH
Advisory Identifier: GHSA-p4ww-mcp9-j6f2
CVSS 8.5
CWE-22
Published
Advisory Summary

CVE-2025-66300 is a HIGH (CVSS 8.5) grav is vulnerable to arbitrary vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Getgrav/grav libraries in the Packagist ecosystem. The issue involves grav is vulnerable to arbitrary file read. Remediation is available by upgrading affected packages to version 1.8.0-beta.27.

CVE-2025-66300 at a Glance

CVE Identifier CVE-2025-66300
GHSA Identifier GHSA-p4ww-mcp9-j6f2
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Getgrav/grav
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-66300

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-66300, 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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 low privilege user account with page editing privilege can read any server files using "Frontmatter" form. - This includes Grav user account files - /grav/user/accounts/*.yaml. This file stores hashed user password, 2FA secret, and the password reset token. - This can allow an adversary to compromise any registered account by resetting a password for a user to get access to the password reset token from the file or by cracking the hashed password. ### Details _The vulnerability can be found in /user/plugins/form/templates/forms/fields/display/display.html.twig_ ![image](https://github.com/getgrav/grav/assets/28057767/953dbdf1-310f-4c8e-866c-8470d70cc11d) ### PoC 1. This PoC was conducted on Grav CMS version 1.7.46 and Admin Plugin version 1.10.46 ![image](https://github.com/getgrav/grav/assets/28057767/6c8607d6-cea3-4699-8a5a-8a04d047676f) 2. go to “http://grav.local/admin/pages” then create new page with “Page Template” option set to “Form”. ![image](https://github.com/getgrav/grav/assets/28057767/451fe8bc-2e2e-4f8a-a548-385aca6d5504) 3. Then go to “Expert” and on Frontmatter input box used to following form template. ![image](https://github.com/getgrav/grav/assets/28057767/9e44758a-021a-45fd-9e26-03abbf8095ef) 4. Save page and go the preview or published page you will see the content of “/etc/passwd” file on the server. ![image](https://github.com/getgrav/grav/assets/28057767/94dc2363-10e1-4e74-81e4-6c7a09db4dff) ### Impact This can allow a low privileged user to perform a full account takeover of other registered users including Administrators. This can also allow an adversary to read any file on the web server. And Due to insufficient permission verification , user who can write a page also can use frontmatter feature using this IDOR vulnerability [PoC IDOR](https://www.youtube.com/watch?v=EU1QA0idoWE&ab_channel=%EA%B9%80%EC%A2%85%EB%AF%BC) mention in [CVE-2024-2792](https://github.com/getgrav/grav/security/advisories/GHSA-f6g2-h7qv-3m5v)

CVE-2025-66300 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-66300?
CVE-2025-66300 is a security vulnerability in Getgrav/grav involving Grav is vulnerable to Arbitrary File Read under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
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-66300?
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 is the CVSS score of CVE-2025-66300?
CVE-2025-66300 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L.
What CWE is associated with CVE-2025-66300?
CVE-2025-66300 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Packagist dependencies for CVE-2025-66300?
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-p4ww-mcp9-j6f2",
  "modified" : "2025-12-02T00:36:44Z",
  "published" : "2025-12-02T00:36:43Z",
  "aliases" : [ "CVE-2025-66300" ],
  "summary" : "Grav is vulnerable to Arbitrary File Read",
  "details" : "### Summary\n\n- A low privilege user account with page editing privilege can read any server files using \"Frontmatter\" form.\n- This includes Grav user account files - /grav/user/accounts/*.yaml. This file stores hashed user password, 2FA secret, and the password reset token.\n- This can allow an adversary to compromise any registered account by resetting a password for a user to get access to the password reset token from the file or by cracking the hashed password.\n\n### Details\n_The vulnerability can be found in /user/plugins/form/templates/forms/fields/display/display.html.twig_\n![image](https://github.com/getgrav/grav/assets/28057767/953dbdf1-310f-4c8e-866c-8470d70cc11d)\n\n\n### PoC\n1.\tThis PoC was conducted on Grav CMS version 1.7.46 and Admin Plugin version 1.10.46\n \n![image](https://github.com/getgrav/grav/assets/28057767/6c8607d6-cea3-4699-8a5a-8a04d047676f)\n\n2.\tgo to “http://grav.local/admin/pages” then create new page with “Page Template” option set to “Form”.\n \n![image](https://github.com/getgrav/grav/assets/28057767/451fe8bc-2e2e-4f8a-a548-385aca6d5504)\n\n3.\tThen go to “Expert” and on Frontmatter input box used to following form template.\n\n![image](https://github.com/getgrav/grav/assets/28057767/9e44758a-021a-45fd-9e26-03abbf8095ef)\n\n4.\tSave page and go the preview or published page you will see the content of “/etc/passwd” file on the server.\n \n![image](https://github.com/getgrav/grav/assets/28057767/94dc2363-10e1-4e74-81e4-6c7a09db4dff)\n\n\n\n### Impact\nThis can allow a low privileged user to perform a full account takeover of other registered users including Administrators. This can also allow an adversary to read any file on the web server. And Due to insufficient permission verification , user who can write a page also can use frontmatter feature using this IDOR vulnerability [PoC IDOR](https://www.youtube.com/watch?v=EU1QA0idoWE&ab_channel=%EA%B9%80%EC%A2%85%EB%AF%BC) mention in [CVE-2024-2792](https://github.com/getgrav/grav/security/advisories/GHSA-f6g2-h7qv-3m5v)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:L"
  } ],
  "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-p4ww-mcp9-j6f2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66300"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getgrav/grav/commit/ed640a13143c4177af013cf001969ed2c5e197ee"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getgrav/grav"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-02T00:36:43Z",
    "nvd_published_at" : "2025-12-01T22:15:49Z"
  }
}