{"id":"CVE-2025-66295","aliases":["CVE-2025-66295","GHSA-h756-wh59-hhjv"],"related":[],"kind":"vulnerability","state":"published","title":"Grav vulnerable to Path traversal / arbitrary YAML write via user creation leading to Account Takeover / System Corruption","summary":"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, twofa_secret, and hashed_password. This vulnerability is fixed in 1.8.0-beta.27.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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, twofa_secret, and hashed_password. This vulnerability is fixed in 1.8.0-beta.27.","source":"cvelist"},{"lang":"en","text":"### Summary\nWhen 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.\n\nExample observed content written by the Admin UI (test data):\nusername: ..\\Nijat\nstate: enabled\nemail: [EMAIL@gmail.com](mailto:EMAIL@gmail.com)\nfullname: 'Nijat Alizada'\nlanguage: en\ncontent_editor: default\ntwofa_enabled: false\ntwofa_secret: RWVEIHC2AFVD6FCR6UHCO3DS4HWXKKDT\navatar: { }\nhashed_password: $2y$10$wl9Ktv3vUmDKCt8o6u2oOuRZr1I04OE0YZf2sJ1QcAherbNnk1XVC\naccess:\nsite:\nlogin: true\n\n\n### Steps to Reproduce\n1. Log in to the Grav Admin UI as an administrator.\n2. Create a new user with the following values (example):\n        a. Username: ..\\POC-TOKEN-2025-09-29\n        b. Fullname: POC-TOKEN-2025-09-29\n        c. Email: poc+2025-09-29@example.test\n        d. Password: (any password)\nObserve that a YAML file containing the POC-TOKEN is written outside user/accounts/ (for example in the parent directory of user/accounts)\n\n\n### Impact\n1. 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.\n2. 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\"\n\n\n### Proof of Concept\nhttps://github.com/user-attachments/assets/cf503d74-f765-4031-8e22-71f6b3630847","format":"markdown","source":"ghsa"},{"lang":"es","text":"Grav es una plataforma web basada en archivos. Versiones anteriores a 1.8.0-beta.27, cuando un usuario con privilegios de creación de usuarios crea un nuevo usuario a través de la interfaz de administración (Admin UI) y proporciona un nombre de usuario que contiene secuencias de salto de ruta (por ejemplo, ..\\Nijat o ../Nijat), Grav escribe el archivo YAML de la cuenta en una ruta no deseada fuera de user/accounts/. El archivo YAML escrito puede contener campos de cuenta como correo electrónico, nombre completo, twofa_secret y contraseña_hash. Esta vulnerabilidad se corrigió en 1.8.0-beta.27.","source":"nvd"}],"published":"2025-12-01T20:46:56.726Z","modified":"2026-09-26T00:10:00.127Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.8.0-beta.27","status":"affected"}],"vendor":"getgrav","product":"grav","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.8.0-beta.27"}],"ecosystem":"Packagist","package":"getgrav/grav","purl":"pkg:composer/getgrav/grav","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.7.49.5","fixed":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"},{"status":"affected","version":"1.8.0"}],"vendor":"getgrav","product":"grav","cpe":"cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-h756-wh59-hhjv","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/getgrav/grav/commit/3462d94d575064601689b236508c316242e15741","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66295","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/getgrav/grav","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-12-02T14:04:26.033Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66295","url":"https://www.cve.org/CVERecord?id=CVE-2025-66295","licence":"CVE Terms of Use","modified":"2025-12-02T14:04:38.344Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h756-wh59-hhjv","url":"https://github.com/advisories/GHSA-h756-wh59-hhjv","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:31.900Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66295","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66295","licence":"Public domain","modified":"2026-09-26T00:10:00.127Z"}],"updatedAt":"2026-11-25T22:59:08.140Z","epss":{"score":0.00596,"percentile":0.49837,"date":"2026-12-01T12:00:22.000Z"}}