Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. getgrav/grav
  4. ›
  5. CVE-2025-66295

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

December 2, 2025

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

References

  • github.com/advisories/GHSA-h756-wh59-hhjv
  • github.com/getgrav/grav
  • github.com/getgrav/grav/commit/3462d94d575064601689b236508c316242e15741
  • github.com/getgrav/grav/security/advisories/GHSA-h756-wh59-hhjv
  • nvd.nist.gov/vuln/detail/CVE-2025-66295

Code Behaviors & Features

Detect and mitigate CVE-2025-66295 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.8.0-beta.27

Fixed versions

  • 1.8.0-beta.27

Solution

Upgrade to version 1.8.0-beta.27 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

packagist/getgrav/grav/CVE-2025-66295.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 14 Dec 2025 00:19:29 +0000.