{"id":"CVE-2025-66302","aliases":["CVE-2025-66302","GHSA-j422-qmxp-hv94"],"related":[],"kind":"vulnerability","state":"published","title":"Grav vulnerable to Path Traversal allowing server files backup","summary":"Grav is a file-based Web platform. Prior to 1.8.0-beta.27, A path traversal vulnerability has been identified in Grav CMS, allowing authenticated attackers with administrative privileges to read arbitrary files on the underlying server filesystem. This vulnerability arises due to insufficient input sanitization in the backup tool, where user-supplied paths are not properly restricted, enabling access to files outside the intended webroot directory. The impact of this vulnerability depends on the privileges of the user account running the application. 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, A path traversal vulnerability has been identified in Grav CMS, allowing authenticated attackers with administrative privileges to read arbitrary files on the underlying server filesystem. This vulnerability arises due to insufficient input sanitization in the backup tool, where user-supplied paths are not properly restricted, enabling access to files outside the intended webroot directory. The impact of this vulnerability depends on the privileges of the user account running the application. This vulnerability is fixed in 1.8.0-beta.27.","source":"cvelist"},{"lang":"en","text":"### Summary\n```\nA path traversal vulnerability has been identified in Grav CMS, versions 1.7.49.5 , allowing authenticated attackers\n with administrative privileges to read arbitrary files on the underlying server filesystem. This vulnerability arises due\n to insufficient input sanitization in the backup tool, where user-supplied paths are not properly restricted, enabling\n access to files outside the intended webroot directory. The impact of this vulnerability depends on the privileges of \nthe user account running the application.\n```\n\n### PoC\n```\nTo accurately demonstrate the maximum potential impact of this vulnerability, the testing environment was configured in a specific way:\n\n- Elevated Privileges: The application was run locally with the highest possible system privileges, operating under the **`root`** user account.\n    \n- Objective: This configuration was chosen to unequivocally show that the path traversal vulnerability is not just a theoretical issue but can lead to a complete compromise of the underlying host when combined with poor operational practices. The ability to read any file on the system is the ultimate test of the flaw's severity.\n    \n\nProof of Concept Goal: Under these conditions, the subsequent PoC will exploit the vulnerability to read the SSH private key\n of the `root` user (`/root/.ssh/id_rsa`). The successful exfiltration of this key represents a worst-case scenario, as it would provide \nan attacker with persistent, undetectable, and complete administrative access to the host server. This highlights the critical intersection\n of an application-layer vulnerability and a infrastructure-level misconfiguration.\n\n```\n\n\n\n\n```\n1- LOGIN AS ADMIN AND  GO TO  : http://127.0.0.1/admin/tools/backups\n2- Change 'Root Folder' to backup directory /../../../../../../../root/.ssh/ \n\n```\n<img width=\"1902\" height=\"492\" alt=\"Screenshot 2025-09-11 161519\" src=\"https://github.com/user-attachments/assets/23a60dc3-7758-4e24-b910-e66a1dd1f5e2\" />\n\n\n\n```\n3- CLICK  : 'SAVE'\n4- CLICK  : 'Backup Now'\n```\n\n<img width=\"1916\" height=\"512\" alt=\"Screenshot 2025-09-11 154151\" src=\"https://github.com/user-attachments/assets/88a63ff2-777e-467e-857b-0644ef698499\" />\n\n```\n5- Extract Backup :\n```\n\n\n<img width=\"704\" height=\"101\" alt=\"Screenshot 2025-09-11 160114\" src=\"https://github.com/user-attachments/assets/b91ce4db-9843-4280-b8f0-32c73aa12d4d\" />\n<img width=\"567\" height=\"101\" alt=\"Screenshot 2025-09-11 160135\" src=\"https://github.com/user-attachments/assets/155ce7d8-c2fc-4b54-b054-f7c7550bec82\" />","format":"markdown","source":"ghsa"},{"lang":"es","text":"Grav es una plataforma web basada en archivos. Versiones anteriores a 1.8.0-beta.27, se ha identificado una vulnerabilidad de salto de ruta en Grav CMS, que permite a atacantes autenticados con privilegios administrativos leer archivos arbitrarios en el sistema de archivos del servidor subyacente. Esta vulnerabilidad surge debido a una sanitización de entrada insuficiente en la herramienta de copia de seguridad, donde las rutas proporcionadas por el usuario no están restringidas adecuadamente, lo que permite el acceso a archivos fuera del directorio webroot previsto. El impacto de esta vulnerabilidad depende de los privilegios de la cuenta de usuario que ejecuta la aplicación. Esta vulnerabilidad está corregida en la versión 1.8.0-beta.27.","source":"nvd"}],"published":"2025-12-01T21:33:40.396Z","modified":"2026-09-26T00:10:00.127Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"}],"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","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-j422-qmxp-hv94","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/getgrav/grav/commit/ed640a13143c4177af013cf001969ed2c5e197ee","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66302","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-03T15:11:05.884Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66302","url":"https://www.cve.org/CVERecord?id=CVE-2025-66302","licence":"CVE Terms of Use","modified":"2025-12-03T15:11:08.768Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j422-qmxp-hv94","url":"https://github.com/advisories/GHSA-j422-qmxp-hv94","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:58.726Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66302","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66302","licence":"Public domain","modified":"2026-09-26T00:10:00.127Z"}],"updatedAt":"2026-11-25T22:59:08.144Z","epss":{"score":0.00683,"percentile":0.47747,"date":"2026-11-30T12:00:22.000Z"}}