Froxlor 2.3.6 has a function called FileDir::makeCorrectFile. The body adds a leading slash if one is missing, strips a handful of shell metacharacters, and returns. That is the function. Two hundred and fifty-six lines above it, in the same file, a sibling called makeCorrectDir accepts a second parameter, walks every component of its argument, calls is_link() on each, and throws if any link escapes the customer's home directory. The parameter that activates that walk has existed since October 13, 2023. makeCorrectFile did not receive it until April 21, 2026. For nine hundred and twenty-one days, every SshKeys cron tick wrote root's authorized_keys for any customer who replaced their own with a symlink.
CVE-2026-41236: makeCorrectFile Only Corrected The Slash
vendor
patterns
cve
proof of concept
The cron runs as root, and it trusts a string
Froxlor ships a periodic job called Froxlor\Cron\System\SshKeys. It runs as root because writing into /root/.ssh/authorized_keys is one of the things it does, and it iterates the panel_ftpusers table because writing each customer's keys into each customer's ~/.ssh/authorized_keys is the rest of what it does. In 2.3.6 the inner loop reads, in essence, like this:
foreach ($result_stmt as $usr) {
$authkeysfile = FileDir::makeCorrectFile($usr['homedir'] . '/.ssh/authorized_keys');
// ... build $authkeys from panel_ssh_keys rows ...
file_put_contents($authkeysfile, $authkeys, FILE_APPEND | LOCK_EX);
@chmod($authkeysfile, 0600);
@chown($authkeysfile, (int)$usr['guid']);
@chgrp($authkeysfile, (int)$usr['guid']);
}The customer controls $usr['homedir'] only insofar as it was set at provisioning time, but the customer absolutely controls everything inside it, including any file or directory under .ssh. Every one of the four PHP calls on $authkeysfile follows symlinks. file_put_contents opens through the link. chmod, chown, and chgrp dereference the link and modify whatever sits at the other end. PHP exposes lchown and lchgrp for the case where you specifically want the link itself, and Froxlor does not call them.
The reporter larlarua's public PoC, attached to GHSA-mq5v-pxpm-8jw2 and tracked as CVE-2026-41236, fits in four shell lines that the FTP user runs inside their own home directory:
rm -rf ~/.ssh
mkdir ~/.ssh
ln -sf /root/.ssh/authorized_keys ~/.ssh/authorized_keys
# add an SSH key in the Froxlor customer panel and wait for the cron tickThe next time the cron fires, root's own authorized_keys gets the customer's key appended, gets chmod 0600, and gets chowned to the customer's UID. The first effect is the privilege escalation. The second and third effects are the part the patch advisory does not discuss.
makeCorrectFile only made the slash correct
Here is the function the cron trusted to keep $authkeysfile inside the customer's tree. This is the whole thing as it shipped in 2.3.6, at lib/Froxlor/FileDir.php line 376:
/**
* Checks a filename for correctness and replaces incorrect chars.
*
* @param string $filename
*
* @return string
*/
public static function makeCorrectFile(string $filename): string
{
if (substr($filename, 0, 1) != '/') {
$filename = '/' . $filename;
}
$filename = self::makeSecurePath($filename);
return $filename;
}makeSecurePath strips the characters ; | & > < \ $ ~ ?and collapses runs of/and.. It does not call is_link. It does not call realpath. It does not call lstat`. It does not accept a base directory. It does not know what a base directory is. The docblock says "checks a filename for correctness and replaces incorrect chars," and that is exactly and only what the function does. The verb in the name is "correct," meaning "tidy," meaning "make sure the leading slash is there and there are not two of them." The verb is not "validate."
A function named makeCorrectFile was loadbearing for the boundary between root and a shell user. It was not designed to be loadbearing for that boundary. Nothing in its signature, its docblock, or its body suggested it was. The cron called it, the cron's author read the name, the cron's author moved on.
makeCorrectDir, two hundred and fifty-six lines up, already walked the symlinks
Open the same file. Scroll up to line 120. There is makeCorrectDir, the sibling helper. It begins like this:
public static function makeCorrectDir(string $dir, string $fixed_homedir = ""): string
{That second parameter, $fixed_homedir, is the entire game. When it is non-empty, the function enters a block that splits $dir on /, walks every component from the customer's homedir down, and on each step checks:
if (is_link($checkpath)) {
$link = readlink($checkpath);
// resolve, normalise, then:
if (substr($resolved, 0, strlen($fixed_homedir)) !== $fixed_homedir) {
throw new Exception("Found symlink pointing outside of customer home directory: " . $checkpath);
}
}The guard refuses to return a path string at all if any component is a symlink pointing outside the customer's tree. It does not silently tidy the path. It throws.
That parameter and that loop landed in commit 9e8f32f1 by [email protected] on Friday, October 13, 2023, with the subject line "check for symlinks when required to be within customer-homedir." The same commit updated seven call sites across SubDomains, Ftps, DirOptions, DirProtections, customer_ftp.php, and Cron/Http/Apache.php to pass the homedir in. The author understood the threat model perfectly. They named it. They built the guard. They wired it through six other places where a customer could place a symlink before a privileged process touched the path.
They did not wire it into the file variant. The file variant sat at line 376, in the same file, untouched, with the same name minus three characters. This is the parallel implementation gap pattern: a security control gets installed in one of a pair of sibling helpers and the other sibling, present in the same module and called from the same threat surface, is left at its old shape because nothing in the audit's mental index pointed at it. The JeecgBoot validateCaptcha case from earlier this year was the same shape one method up: two sibling methods on one class, one method got the validation, the other method did not, the attacker called the other method. Froxlor's case is the same shape one scope wider: two sibling functions in one file, one function got the homedir-walk guard, the other function did not, the cron called the other function.
Why does the gap survive review? Because the guard's author and the guard's reader both grep for the function name when they want to know "is this path validated." git grep makeCorrectDir will list every call site, every one of which now passes a homedir. git grep makeCorrectFile will list a different set of call sites, and the reader, having satisfied themselves about the directory variant, will not run the second grep. The shared prefix is a false cognate. The two functions look like a pair, and humans assume pairs share invariants. They share twelve characters of identifier and nothing else.
The patch is the sibling's loop, pasted into the file variant
Commit 3dceec46 by the same author on Tuesday, April 21, 2026, fixes the cron in two ways at once. The smaller change is at the call site:
- $authkeysfile = FileDir::makeCorrectFile($usr['homedir'] . '/.ssh/authorized_keys');
+ $userHomeDir = FileDir::makeCorrectDir($usr['homedir'] . '/.ssh', $usr['homedir']);
+ $authkeysfile = FileDir::makeCorrectFile($userHomeDir . '/authorized_keys', $usr['homedir']);The larger change is to makeCorrectFile itself. It grew the second parameter that makeCorrectDir had carried since 2023, and it grew a copy of the same component-walking loop, and it grew an extra block for the case where $filename itself is a symlink. The function went from twelve lines to roughly forty. The fix is literally the sibling function's body, lightly adapted, pasted in.
The fix existed in the same file for nine hundred and twenty-one days. It was indexed under the wrong name.
That gap, October 13, 2023 to April 21, 2026, is the part the GHSA advisory does not measure. The advisory dates the bug from the version it was disclosed against, 2.3.6. The bug was already old when 2.3.6 shipped. The guard's author shipped the guard for directories and shipped the absence of the guard for files in the same commit. Every release of Froxlor between 0.10 and 2.3.6 had a makeCorrectFile that did not walk components, and every release between October 2023 and 2.3.6 had a makeCorrectFile that conspicuously, by sibling comparison, did not walk components.
The chown follows the symlink too
The advisory frames CVE-2026-41236 as an arbitrary-write-as-root issue, and that is the primary teeth. The four-line PoC takes root. There is a secondary effect that the patch does not undo, and a defender reading the GHSA writeup will not see.
Recall the cron's last three lines:
@chmod($authkeysfile, 0600);
@chown($authkeysfile, (int)$usr['guid']);
@chgrp($authkeysfile, (int)$usr['guid']);PHP's chown follows symlinks. On a vulnerable 2.3.6 host where the PoC has fired even once, /root/.ssh/authorized_keys is now owned by the customer's UID and group, with mode 0600. The customer's UID owns root's authorized_keys file. Root still reads it because sshd reads as root regardless of file ownership. The customer now controls future appends to it without needing the cron, because the customer owns the file outright.
This is the trust inversion in its clearest form. The privileged provisioning tool's job is to lay down keys under root's authority on behalf of customers, and the tool's hands become the customer's hands at the precise moment the tool reaches for the chown syscall. Every customer who has ever exploited this on a host gets persistence past the patch. The 2.3.7 patch fixes the cron's future writes. It does not chown /root/.ssh/authorized_keys back to root, because the patch does not know which hosts have already been hit.
A defender who has run Froxlor 2.3.6 in production should stat /root/.ssh/authorized_keys and check the owner. If the owner is not 0, the patch landed too late.
The other quiet detail: if the customer's symlink targets /root/.ssh/authorized_keys and root's authorized_keys did not exist before, file_put_contents with FILE_APPEND will create it through the link with the umask of the cron process, and the subsequent chmod 0600 will set the permissions to what sshd wants. The cron is not just willing to write keys to root, it is willing to set up root's SSH authentication for the first time on behalf of an unprivileged user. The hook fires whether the target existed or not.
makeCorrectDir had the safety net. makeCorrectFile shared its prefix and nothing else.