CVE-2025-66295 — Vulnerability in getgrav/grav — CVE Details
Grav vulnerable to Path traversal / arbitrary YAML write via user creation leading to Account Takeover / System Corruption
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.79%). Schedule for your next planned update.
Does your project use an affected getgrav/grav version?
Paste your composer.lock to check it for CVE-2025-66295 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
When a user with privilege of user creation creates a new user through the Admin UI and supplies a username containing path traversal sequences (for example ..\Nijat or ../Nijat), Grav writes the account YAML file to an unintended path outside user/accounts/. The written YAML can contain account fields such as email, fullname, twofa_secret, and hashed_password. In my tests, I was able to cause the Admin UI to write the following content into arbitrary .yaml files (including files like email.yaml, system.yaml, or other site YAML files like admin.yaml) — demonstrating arbitrary YAML write / overwrite via the Admin UI.
Example observed content written by the Admin UI (test data): username: ..\Nijat state: enabled email: EMAIL@gmail.com fullname: 'Nijat Alizada' language: en content_editor: default twofa_enabled: false twofa_secret: RWVEIHC2AFVD6FCR6UHCO3DS4HWXKKDT avatar: { } hashed_password: $2y$10$wl9Ktv3vUmDKCt8o6u2oOuRZr1I04OE0YZf2sJ1QcAherbNnk1XVC access: site: login: true
Steps to Reproduce
- Log in to the Grav Admin UI as an administrator.
- Create a new user with the following values (example): a. Username: ..\POC-TOKEN-2025-09-29 b. Fullname: POC-TOKEN-2025-09-29 c. Email: poc+2025-09-29@example.test d. Password: (any password) Observe that a YAML file containing the POC-TOKEN is written outside user/accounts/ (for example in the parent directory of user/accounts)
Impact
- Config corruption / service disruption: Overwriting system.yaml, email.yaml, or plugin config files with attacker-controlled YAML (even if limited to fields present in account YAML) could break functionality, disable services, or cause misconfiguration requiring recovery from backups.
- Account takeover, any user with create user privilege can modify other user's email and password by just creating a new user with the name "..\accounts\USERNAME_OF_VICTIM"
Proof of Concept
https://github.com/user-attachments/assets/cf503d74-f765-4031-8e22-71f6b3630847
Advisory Timeline
- First published December 2, 2025 (359 days ago).
- Last revised September 10, 2026 — 282 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "getgrav/grav:^1.8.0-beta.27"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| getgrav/grav Packagist · Affected: 0.8.0, 0.9.0, 0.9.1, 0.9.10 (+313 more) | 1.8.0-beta.27 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2025-66295?
- Grav vulnerable to Path traversal / arbitrary YAML write via user creation leading to Account Takeover / System Corruption. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2025-66295?
- CVE-2025-66295 affects getgrav/grav. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-66295 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 52.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-42613CRITICAL
Grav Vulnerable to Privilege Escalation via Missing Server-Side Validation of groups/access
- CVE-2026-75828CRITICAL
Grav: detectXss() misses an event-handler attribute after an unpaired quote in an unquoted attribute value, giving stored XSS
- CVE-2026-42607CRITICAL
Grav Vulnerable to Remote Code Execution (RCE) via Malicious Plugin ZIP Upload in Direct Install Feature
- CVE-2025-66300HIGH
Grav is vulnerable to Arbitrary File Read
- CVE-2026-72819HIGH
Grav CMS vulnerable to remote code execution via .zip file upload
- CVE-2026-42611HIGH
Grav is Vulnerable to Stored XSS via Tag Injection
- CVE-2026-75837HIGH
Grav: Missing admin.super guard on core group blueprint access field allows admin.users operator to escalate to super-admin
- CVE-2023-31506MEDIUM
Cross-site scripting (XSS) vulnerability in Grav