{"id":"CVE-2026-21857","aliases":["CVE-2026-21857","GHSA-824x-88xg-cwrv"],"related":[],"kind":"vulnerability","state":"published","title":"Redaxo has Path Traversal in Backup Addon Leading to Arbitrary File Read","summary":"REDAXO is a PHP-based content management system. Prior to version 5.20.2, authenticated users with backup permissions can read arbitrary files within the webroot via path traversal in the Backup addon's file export functionality. The Backup addon does not validate the `EXPDIR` POST parameter against the UI-generated allowlist of permitted directories. An attacker can supply relative paths containing `../` sequences (or even absolute paths inside the document root) to include any readable file in the generated `.tar.gz` archive. Version 5.20.2 fixes this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"REDAXO is a PHP-based content management system. Prior to version 5.20.2, authenticated users with backup permissions can read arbitrary files within the webroot via path traversal in the Backup addon's file export functionality. The Backup addon does not validate the `EXPDIR` POST parameter against the UI-generated allowlist of permitted directories. An attacker can supply relative paths containing `../` sequences (or even absolute paths inside the document root) to include any readable file in the generated `.tar.gz` archive. Version 5.20.2 fixes this issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nAuthenticated users with backup permissions can read arbitrary files within the webroot via path traversal in the Backup addon's file export functionality.\n<img width=\"664\" height=\"899\" alt=\"image\" src=\"https://github.com/user-attachments/assets/fd1ca69e-b275-4daf-9a62-621cde6525f5\" />\n<img width=\"2358\" height=\"445\" alt=\"image\" src=\"https://github.com/user-attachments/assets/fad81152-9e1b-413e-9823-09540a23e2fb\" />\n\n\n### Details\nThe Backup addon does not validate the `EXPDIR` POST parameter against the UI-generated allowlist of permitted directories.  \nAn attacker can supply relative paths containing `../` sequences (or even absolute paths inside the document root) to include any readable file in the generated `.tar.gz` archive.\n\nVulnerable code:\n- `redaxo/src/addons/backup/pages/export.php` (lines 72-76) – directly uses `$_POST['EXPDIR']`\n- `redaxo/src/addons/backup/lib/backup.php` (lines ~413 & ~427) – concatenates unsanitized user input with base path\n\nThis allows disclosure of sensitive files such as:\n- `redaxo/data/core/config.yml` → database credentials + password hashes of all backend users\n- `.env`, custom configuration files, logs, uploaded malicious files, etc.\n\n### Affected versions\n≤ 5.20.1 (confirmed working)\n\n### Patched versions\nNone (as of 2025-12-09)\n\n### PoC – Extracting database credentials and password hashes\n1. Log in as any user with Backup permission\n2. Go to Backup → Export → Files\n\n<img width=\"1240\" height=\"960\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bc05ba18-9664-4be2-b637-4fec3a0f409a\" />\n\n3. Intercept the request with Burp Suite \n\n<img width=\"2184\" height=\"478\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9fa754a1-2cd0-4d3d-a5cc-cfa34c8a1718\" />\n\n4. Change one `EXPDIR[]` value to `../../../../var/www/html/redaxo/data/core`\n\n<img width=\"978\" height=\"591\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d15f5c7f-b72c-44cc-9be2-da8d3f26f124\" />\n\n5. Send request → download archive\n<img width=\"423\" height=\"131\" alt=\"image\" src=\"https://github.com/user-attachments/assets/db8a8bda-cdaf-4dea-812f-1e312da908e2\" />\n\n6. Extract and open `data/core/config.yml`\n<img width=\"859\" height=\"281\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c8112ce1-5a1d-435f-953b-7eb4e711e042\" />\n\nResult: plaintext database password \n<img width=\"2534\" height=\"1198\" alt=\"image\" src=\"https://github.com/user-attachments/assets/218ae917-868a-437e-98b0-6471b82c0b10\" />\n\n### Impact\nFull compromise of the REDAXO installation:\n- Database takeover\n- Password hash extraction → offline cracking → admin access\n- When combined with other vulnerabilities → RCE\n\nCVSS 4.0 vector & score below.\n\n### Credits\nDiscovered by: Łukasz Rybak","format":"markdown","source":"ghsa"},{"lang":"es","text":"REDAXO es un sistema de gestión de contenido basado en PHP. Antes de la versión 5.20.2, los usuarios autenticados con permisos de copia de seguridad pueden leer archivos arbitrarios dentro del directorio raíz web (webroot) mediante salto de ruta en la funcionalidad de exportación de archivos del complemento Backup. El complemento Backup no valida el parámetro POST 'EXPDIR' contra la lista blanca de directorios permitidos generada por la interfaz de usuario. Un atacante puede proporcionar rutas relativas que contengan secuencias '../' (o incluso rutas absolutas dentro del directorio raíz del documento) para incluir cualquier archivo legible en el archivo '.tar.gz' generado. La versión 5.20.2 corrige este problema.","source":"nvd"}],"published":"2026-01-05T20:02:58.000Z","modified":"2026-06-17T10:19:02.403Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-24"],"affected":[{"ranges":[{"version":"< 5.20.2","status":"affected"}],"vendor":"redaxo","product":"redaxo","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.20.2"}],"ecosystem":"Packagist","package":"redaxo/source","purl":"pkg:composer/redaxo/source","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.20.2"}],"vendor":"redaxo","product":"redaxo","cpe":"cpe:2.3:a:redaxo:redaxo:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/redaxo/redaxo/security/advisories/GHSA-824x-88xg-cwrv","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/redaxo/redaxo/releases/tag/5.20.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-21857","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/redaxo/redaxo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-01-08T15:09:21.125Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-21857","url":"https://www.cve.org/CVERecord?id=CVE-2026-21857","licence":"CVE Terms of Use","modified":"2026-01-08T18:17:35.890Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-824x-88xg-cwrv","url":"https://github.com/advisories/GHSA-824x-88xg-cwrv","licence":"CC-BY-4.0","modified":"2026-02-03T03:16:15.825Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-21857","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-21857","licence":"Public domain","modified":"2026-06-17T10:19:02.403Z"}],"updatedAt":"2026-11-25T22:59:12.650Z","epss":{"score":0.00535,"percentile":0.46623,"date":"2026-12-01T12:00:22.000Z"}}