File Browser: Command Injection via Authentication Hook Shell Substitution (Pre-Authentication RCE)
The Hook Authentication feature in File Browser allows administrators to delegate login verification to an external shell command. User-supplied credentials (username and password) are interpolated into this command string using os.Expand without sanitization. An unauthenticated remote attacker can inject shell metacharacters in the username or password field at the login screen, causing the server to execute arbitrary OS commands before any authentication takes place. This is a critical pre-authentication RCE.
auth/hook.goHookAuth.RunCommand| Metric | Value | Rationale |
|---|---|---|
| Attack Vector (AV) | Network (N) | Exploitable via the login endpoint over HTTP from any network |
| Attack Complexity (AC) | Low (L) | Single crafted HTTP request; no preparation needed |
| Attack Requirements (AT) | None (N) | No race condition or special timing required |
| Privileges Required (PR) | None (N) | No account required — pre-authentication attack |
| User Interaction (UI) | None (N) | Fully automated; no victim action needed |
| Vulnerable System Confidentiality (VC) | High (H) | Full read access to server filesystem and env |
| Vulnerable System Integrity (VI) | High (H) | Arbitrary file write/modification |
| Vulnerable System Availability (VA) | High (H) | Can kill processes, exhaust resources |
| Subsequent System Confidentiality (SC) | None (N) | No direct impact on downstream systems assumed |
| Subsequent System Integrity (SI) | None (N) | — |
| Subsequent System Availability (SA) | None (N) | — |
Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Base Score: 9.3 (Critical)
> Note: PR:None is the critical differentiator from vulnerabilities 01 and 02. Because the injection point is the unauthenticated login endpoint, no account or session is required. A single HTTP request to the login API is sufficient to achieve RCE.
| ID | Name | Role |
|---|---|---|
| [CWE-78](https://cwe.mitre.org/data/definitions/78.html) | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | Primary — attacker-supplied credentials embedded in shell command string via os.Expand |
| [CWE-88](https://cwe.mitre.org/data/definitions/88.html) | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | Secondary — $USERNAME/$PASSWORD expansion injects additional shell commands |
| [CWE-306](https://cwe.mitre.org/data/definitions/306.html) | Missing Authentication for Critical Function | Secondary — OS command execution is reachable before any authentication is verified |
HookAuth.RunCommand builds the authentication command and substitutes credential values using os.Expand:
```go
// auth/hook.go
envMapping := func(key string) string {
switch key {
case "USERNAME":
return a.Cred.Username // directly from the HTTP login request body
case "PASSWORD":
return a.Cred.Password // directly from the HTTP login request body
default:
return os.Getenv(key)
}
}
for i, arg := range command {
if i == 0 { continue }
command[i] = os.Expand(arg, envMapping) // no escaping applied
}
```
os.Expand performs plain text substitution. There is no escaping, quoting, or validation of the credential values before they are embedded into the command string.
If an admin has configured the hook authentication command as:
```
sh -c "test $USERNAME = 'admin'"
```
...and an attacker submits the username ; id # at the login screen, the expanded command becomes:
```sh
sh -c "test ; id # = 'admin'"
```
The ; terminates the test expression and the shell executes id. The # comments out the remainder, preventing a syntax error. The attacker's command runs with the privileges of the File Browser process — without needing a valid account or password.
1. Admin enables Hook Authentication and sets the command to:
```
sh -c "test $USERNAME = 'admin'"
```
2. An unauthenticated attacker sends a login request (e.g., via curl or the web UI) with:
; id #3. The server executes:
```sh
sh -c "test ; id # = 'admin'"
```
4. The id command runs on the server, confirming pre-authentication RCE.
No account is needed. The attacker does not need to know any valid credentials. A single request is sufficient.
An unauthenticated remote attacker can execute arbitrary OS commands on the server under the privilege level of the File Browser process. This is the most severe class of vulnerability in this codebase:
CVE-2026-54088 is recorded against 3 packages.
Published on 17 July 2026 and last revised on 21 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com (Advisory)
nvd.nist.gov (Advisory)
github.com/filebrowser/filebrowser has other advisories on record. If you are patching this one, these are worth checking on the same host:
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| github.com/filebrowser/filebrowser | — | — |
| github.com/filebrowser/filebrowser/v2 | — | — |
| unknown | — | — |
References
Similar Threats
Exploit Protection
CVE-2026-54088 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-54088 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.