CVE-2026-54088: File Browser Remote Code Execution Vulnerability
CRITICALCVE-2026-54088 is a CRITICAL remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting File Browser libraries in the Go ecosystem. The issue involves command injection via authentication hook shell substitution (pre-authentication rce). Remediation is available by upgrading affected packages to version 2.63.6.
CVE-2026-54088 at a Glance
How to Fix CVE-2026-54088
To remediate this vulnerability, upgrade all affected File Browser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/filebrowser/filebrowser/v2 to 2.63.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/filebrowser/filebrowser/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-54088, inspect your project dependencies for File Browser:
inspect dependencies for github.com/filebrowser/filebrowser/v2
Analyze the terminal output to locate any version of File Browser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.63.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In File Browser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-54088 Affected File Browser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/filebrowser/filebrowser/v2
|
Go |
< 2.63.6
|
2.63.6
|
References
Frequently Asked Questions
What is CVE-2026-54088?
Which File Browser versions are affected?
What version fixes CVE-2026-54088?
Is github.com/filebrowser/filebrowser/v2 affected?
What CWE is associated with CVE-2026-54088?
How can I check Go dependencies for CVE-2026-54088?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m93h-4hw7-5qcm",
"modified" : "2026-07-10T19:32:32Z",
"published" : "2026-07-10T19:32:32Z",
"aliases" : [ "CVE-2026-54088" ],
"summary" : "File Browser: Command Injection via Authentication Hook Shell Substitution (Pre-Authentication RCE)",
"details" : "## Overview\n\nThe 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**.\n\n## Affected Location\n\n- **File:** `auth/hook.go`\n- **Function:** `HookAuth.RunCommand`\n\n## CVSS v4.0\n\n| Metric | Value | Rationale |\n|---|---|---|\n| Attack Vector (AV) | Network (N) | Exploitable via the login endpoint over HTTP from any network |\n| Attack Complexity (AC) | Low (L) | Single crafted HTTP request; no preparation needed |\n| Attack Requirements (AT) | None (N) | No race condition or special timing required |\n| Privileges Required (PR) | **None (N)** | **No account required — pre-authentication attack** |\n| User Interaction (UI) | None (N) | Fully automated; no victim action needed |\n| Vulnerable System Confidentiality (VC) | High (H) | Full read access to server filesystem and env |\n| Vulnerable System Integrity (VI) | High (H) | Arbitrary file write/modification |\n| Vulnerable System Availability (VA) | High (H) | Can kill processes, exhaust resources |\n| Subsequent System Confidentiality (SC) | None (N) | No direct impact on downstream systems assumed |\n| Subsequent System Integrity (SI) | None (N) | — |\n| Subsequent System Availability (SA) | None (N) | — |\n\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`\n**Base Score: 9.3 (Critical)**\n\n> **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.\n\n## CWE\n\n| ID | Name | Role |\n|---|---|---|\n| [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` |\n| [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 |\n| [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 |\n\n## Technical Details\n\n`HookAuth.RunCommand` builds the authentication command and substitutes credential values using `os.Expand`:\n\n```go\n// auth/hook.go\nenvMapping := func(key string) string {\n switch key {\n case \"USERNAME\":\n return a.Cred.Username // directly from the HTTP login request body\n case \"PASSWORD\":\n return a.Cred.Password // directly from the HTTP login request body\n default:\n return os.Getenv(key)\n }\n}\n\nfor i, arg := range command {\n if i == 0 { continue }\n command[i] = os.Expand(arg, envMapping) // no escaping applied\n}\n```\n\n`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.\n\nIf an admin has configured the hook authentication command as:\n\n```\nsh -c \"test $USERNAME = 'admin'\"\n```\n\n...and an attacker submits the username `; id #` at the login screen, the expanded command becomes:\n\n```sh\nsh -c \"test ; id # = 'admin'\"\n```\n\nThe `;` 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**.\n\n## Attack Scenario / Reproduction Steps\n\n1. Admin enables Hook Authentication and sets the command to:\n ```\n sh -c \"test $USERNAME = 'admin'\"\n ```\n2. An unauthenticated attacker sends a login request (e.g., via `curl` or the web UI) with:\n - **Username:** `; id #`\n - **Password:** (any value)\n3. The server executes:\n ```sh\n sh -c \"test ; id # = 'admin'\"\n ```\n4. The `id` command runs on the server, confirming pre-authentication RCE.\n\nNo account is needed. The attacker does not need to know any valid credentials. A single request is sufficient.\n\n## Impact\n\nAn 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:\n\n- **No authentication required** — exposed to the entire internet if the service is public-facing.\n- **Single request** — no setup, no enumeration, no prior foothold.\n- Full server compromise: data exfiltration, persistent backdoor installation, lateral movement to internal networks.\n\nAny internet-facing File Browser instance with Hook Authentication enabled is fully compromised by a single malformed login attempt.\n\n## Proof of Concept\n\n```go\npackage auth\n\nimport (\n \"os\"\n \"strings\"\n \"testing\"\n)\n\nfunc TestPoC_AuthHookInjection(t *testing.T) {\n // Simulate the admin-configured hook authentication command.\n // This represents a realistic configuration: verify the username via a shell expression.\n a := &HookAuth{\n Command: \"sh -c $USERNAME\",\n Cred: hookCred{\n // Attacker-supplied username from the login form.\n // The password is irrelevant.\n Username: \"id ; echo injected\",\n Password: \"anything\",\n },\n }\n\n // Simulate the RunCommand logic in auth/hook.go\n command := strings.Split(a.Command, \" \")\n\n envMapping := func(key string) string {\n if key == \"USERNAME\" {\n return a.Cred.Username\n }\n return os.Getenv(key)\n }\n\n for i, arg := range command {\n if i == 0 {\n continue\n }\n // os.Expand substitutes $USERNAME with the attacker's input.\n // The result is treated as a shell script — no escaping is applied.\n command[i] = os.Expand(arg, envMapping)\n }\n\n // The shell will execute: sh -c \"id ; echo injected\"\n expectedArg := \"id ; echo injected\"\n if command[2] != expectedArg {\n t.Errorf(\"Expected command argument %q, got %q\", expectedArg, command[2])\n }\n\n t.Logf(\"Confirmed: malicious username was injected as a shell script. Executing: %v\", command)\n}\n```\n\n## Remediation\n\nPass credentials exclusively as environment variables, not as shell string substitutions. This feature is undocumented, so removing it should not cause issues.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/filebrowser/filebrowser/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.63.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.63.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-m93h-4hw7-5qcm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54088"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/filebrowser/filebrowser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-306", "CWE-78", "CWE-88" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-10T19:32:32Z",
"nvd_published_at" : "2026-06-25T19:16:40Z"
}
}