CVE-2025-52995

CVE-2025-52995 is a high-severity command injection vulnerability in github.com/filebrowser/filebrowser/v2 (go), affecting versions < 2.33.10. It is fixed in 2.33.10.

Summary

Summary

The Command Execution feature of Filebrowser only allows the execution of shell command which have been predefined on a user-specific allowlist. The implementation of this allowlist is erroneous, allowing a user to execute additional commands not permitted.

Impact

A user can execute more shell commands than they are authorized for. The concrete impact of this vulnerability depends on the commands configured, and the binaries installed on the server or in the container image. Due to the missing separation of scopes on the OS-level, this could give an attacker access to all files managed the application, including the File Browser database.

Vulnerability Description

For a user to make use of the command execution feature, two things need to happen in advance:

  1. An administrator needs to grant that account the Execute commands permission
  2. The command to be executed needs to be listed in the Commands input field (also done by an administrator)

If a user tries to execute a different command, it gets rejected by the application.

The allowlist verification of a command happens in the function CanExecute in the file users/users.go:

// CanExecute checks if an user can execute a specific command.
func (u *User) CanExecute(command string) bool {
	if !u.Perm.Execute {
		return false
	}

	for _, cmd := range u.Commands {
		if regexp.MustCompile(cmd).MatchString(command) {
			return true
		}
	}

	return false
}

This check employs a regular expression which does not test if the command issued (command) is identical to a configured one (cmd, part of the array u.Commands) but rather only if the issued command contains an allowed one.
This has the consequence, that, e.g., if you are only granted access to the ls command, you will also be allowed to execute lsof and lsusb.

As a prerequisite, an attacker needs an account with the Execute Commands permission and some permitted commands.

Proof of Concept

Grant a user the Execute commands permission and allow them to use only ls in the Commands field.

Afterwards, login as that user, open a command execution window and execute lsof and lsusb.

Recommended Countermeasures

The CanExecute function in the Filebrowser source code should be fixed to only allow exact matches of the command specified instead of doing partial matching.
The correctness of this fix should be extensively tested in the application's automated test suite.

Timeline

  • 2025-03-25 Identified the vulnerability in version 2.32.0
  • 2025-04-11 Contacted the project
  • 2025-04-18 Vulnerability disclosed to the project
  • 2025-06-25 Uploaded advisories to the project's GitHub repository
  • 2025-06-25 CVE ID assigned by GitHub
  • 2025-06-26 Fix released in version 2.33.10

References

Credits

Impact

Untrusted input is inserted into a command that is later executed by the application, allowing the attacker to alter the intent of that command. Typical impact: arbitrary command execution in the application's environment.

CVE-2025-52995 has a CVSS score of 8.0 (High). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.33.10); upgrading removes the vulnerable code path.

Affected versions

github.com/filebrowser/filebrowser/v2 (< 2.33.10) github.com/filebrowser/filebrowser (<= 1.11.0)

Security releases

github.com/filebrowser/filebrowser/v2 → 2.33.10 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade github.com/filebrowser/filebrowser/v2 to 2.33.10 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-52995? CVE-2025-52995 is a high-severity command injection vulnerability in github.com/filebrowser/filebrowser/v2 (go), affecting versions < 2.33.10. It is fixed in 2.33.10. Untrusted input is inserted into a command that is later executed by the application, allowing the attacker to alter the intent of that command.
  2. How severe is CVE-2025-52995? CVE-2025-52995 has a CVSS score of 8.0 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-52995?
    • github.com/filebrowser/filebrowser/v2 (go) (versions < 2.33.10)
    • github.com/filebrowser/filebrowser (go) (versions <= 1.11.0)
  4. Is there a fix for CVE-2025-52995? Yes. CVE-2025-52995 is fixed in 2.33.10. Upgrade to this version or later.
  5. Is CVE-2025-52995 exploitable, and should I be worried? Whether CVE-2025-52995 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-52995 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-52995? Upgrade github.com/filebrowser/filebrowser/v2 to 2.33.10 or later.

Other vulnerabilities in github.com/filebrowser/filebrowser/v2

CVE-2026-54090CVE-2026-54093CVE-2026-54094CVE-2026-54092CVE-2026-54096

Stop the waste.
Protect your environment with Kodem.