CVE-2025-66295: Grav vulnerable to Path traversal / arbitrary YAML write via user creation leading to Account Takeover / System Corruption

Published Dec 1, 2025
·
Updated

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, twofasecret, and hashedpassword. 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 contenteditor: default twofaenabled: false twofasecret: RWVEIHC2AFVD6FCR6UHCO3DS4HWXKKDT avatar: { } hashedpassword: $2y$10$wl9Ktv3vUmDKCt8o6u2oOuRZr1I04OE0YZf2sJ1QcAherbNnk1XVC access: site: login: true

Steps to Reproduce 1. Log in to the Grav Admin UI as an administrator. 2. 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 1. 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. 2. 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\USERNAMEOFVICTIM"

Proof of Concept https://github.com/user-attachments/assets/cf503d74-f765-4031-8e22-71f6b3630847

Other sources

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, 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, twofasecret, and hashedpassword. This vulnerability is fixed in 1.8.0-beta.27.

MITRE

Affected Software

29 affected componentsFixes available
Grav Grav<1.8.0-beta.27
composer/getgrav/grav<1.8.0-beta.27
1.8.0-beta.27
getgrav grav>=1.7.49.5<1.8.0
getgrav grav=1.8.0-beta1
getgrav grav=1.8.0-beta10
getgrav grav=1.8.0-beta11
getgrav grav=1.8.0-beta12
getgrav grav=1.8.0-beta13
getgrav grav=1.8.0-beta14
getgrav grav=1.8.0-beta15
getgrav grav=1.8.0-beta16
getgrav grav=1.8.0-beta17
getgrav grav=1.8.0-beta18
getgrav grav=1.8.0-beta19
getgrav grav=1.8.0-beta2
getgrav grav=1.8.0-beta20
getgrav grav=1.8.0-beta21
getgrav grav=1.8.0-beta22
getgrav grav=1.8.0-beta23
getgrav grav=1.8.0-beta24
getgrav grav=1.8.0-beta25
getgrav grav=1.8.0-beta26
getgrav grav=1.8.0-beta3
getgrav grav=1.8.0-beta4
getgrav grav=1.8.0-beta5
getgrav grav=1.8.0-beta6
getgrav grav=1.8.0-beta7
getgrav grav=1.8.0-beta8
getgrav grav=1.8.0-beta9

Event History

Dec 1, 2025
CVE Published
via MITRE·08:46 PM
Data Sourced
via MITRE·08:46 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Dec 2, 2025
Advisory Published
via GitHub·01:23 AM
Data Sourced
via GitHub·01:23 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-66295?

CVE-2025-66295 has a critical severity rating due to potential exploitation through path traversal that allows unauthorized file access.

2

How do I fix CVE-2025-66295?

To fix CVE-2025-66295, upgrade to Grav version 1.8.0-beta.27 or later, where this vulnerability has been addressed.

3

What is the nature of the vulnerability in CVE-2025-66295?

CVE-2025-66295 is a path traversal vulnerability that occurs when user input for a username is not properly sanitized, allowing file access outside intended directories.

4

Who is affected by CVE-2025-66295?

CVE-2025-66295 affects users of Grav versions prior to 1.8.0-beta.27 who are able to create new user accounts.

5

What should I do if I cannot upgrade to a fixed version for CVE-2025-66295?

If upgrading is not possible for CVE-2025-66295, consider disabling user account creation or implementing additional input validation to mitigate the risk.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203