Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.6%top 53%

V2: File Browser: Command Injection via Authentication Hook Shell Substitution (Pre-Authentication RCE) (CVE-2026-54088)

0
Critical
Published: 07/10/2026 (07/10/2026, 19:32:32 UTC)
Source: GCVE Database
Product: github.com/filebrowser/filebrowser/v2

Description

## Overview 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**. ## Affected Location - **File:** `auth/hook.go` - **Function:** `HookAuth.RunCommand` ## CVSS v4.0 | 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. ## CWE | 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 | ## Technical Details `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**. ## Attack Scenario / Reproduction Steps 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: - **Username:** `; id #` - **Password:** (any value) 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. ## Impact 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: - **No authentication required** — exposed to the entire internet if the service is public-facing. - **Single request** — no setup, no enumeration, no prior foothold. - Full server compromise: data exfiltration, persistent backdoor in

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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 software

Goghsa
github.com/filebrowser/filebrowser/v2
Affected versions
<2.63.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/11/2026, 09:50:01 UTC

Technical Analysis

The Hook Authentication feature in File Browser (file auth/hook.go, function HookAuth.RunCommand) allows administrators to delegate login verification to an external shell command. This command string is constructed by substituting the username and password using Go's os.Expand function without any escaping or validation. An attacker can inject shell metacharacters in the username or password fields at the login screen, causing the server to execute arbitrary OS commands before any authentication occurs. This results in a critical pre-authentication remote code execution vulnerability (CWE-78, CWE-88, CWE-306). The vulnerability affects all versions prior to 2.63.6. The CVSS v4.0 base score is 9.3 (Critical), reflecting network attack vector, no privileges required, no user interaction, and high impact on system confidentiality, integrity, and availability.

Potential Impact

An unauthenticated remote attacker can execute arbitrary operating system commands on the server hosting File Browser with the privileges of the File Browser process. This allows full compromise of the server, including reading sensitive data, modifying or deleting files, and disrupting service availability. Because the vulnerability is exploitable without authentication and requires only a single request, it poses a severe risk to any public-facing File Browser instance using the Hook Authentication feature.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, administrators should disable the Hook Authentication feature or avoid using external shell commands for authentication. Avoid exposing the File Browser login interface to untrusted networks. Monitor vendor communications for an official patch or update that addresses this command injection vulnerability.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-m93h-4hw7-5qcm
Osv Schema Version
1.4.0
Aliases
["CVE-2026-54088"]
Ecosystems
["Go"]
Database Specific Severity
CRITICAL
Cvss Version
4.0

Threat ID: 6a520eb368715ace438f526e

Added to database: 07/11/2026, 09:36:51 UTC

Last enriched: 07/11/2026, 09:50:01 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 53

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses