Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

Recursive copy, rename and delete ignore rules denying descendants

High
hacdias published GHSA-77x8-73f4-5485 Jul 27, 2026

Package

gomod github.com/filebrowser/filebrowser/v2 (Go)

Affected versions

<= 2.63.21

Patched versions

v2.63.22

Description

Summary

File Browser's path rules can deny a descendant while leaving its parent allowed. Recursive copy, rename and delete authorize only the root of the operation and then process the whole subtree, so an authenticated non-administrator can copy or rename an allowed parent to read denied descendants at the new location, or delete the parent to destroy them. Reported against v2.63.2 and verified at v2.63.21.

Details

http/resource.go checks the root of the operation only. resourcePatchHandler authorizes the two endpoints of a copy or rename:

	if !d.Check(src) || !d.Check(dst) {
		return http.StatusForbidden, nil
	}

and resourceDeleteHandler resolves its target through files.NewFileInfo, whose checker validates that one path. The recursive work then runs with no checker at all:

	case "copy":
		...
		return fileutils.Copy(d.user.Fs, src, dst, d.settings.FileMode, d.settings.DirMode)
		err = d.RunHook(func() error {
			return d.user.Fs.RemoveAll(r.URL.Path)
		}, "delete", r.URL.Path, "", d.user)

fileutils.CopyDir, fileutils.MoveFile and RemoveAll walk the tree directly, so every descendant is copied, moved or removed regardless of the rules. Everywhere else the rules are applied per path: listings drop denied entries (files.FileInfo.readListing), direct access returns 403 (files.NewFileInfo), and the archive download walker checks each descendant (getFiles in http/raw.go).

PoC

Preconditions:

  • The attacker is an authenticated non-administrator with the relevant file-operation permission on the parent directory.
  • A rule denies one or more descendants while leaving the parent allowed.
  • The destination of the copy or rename is allowed.

Steps:

  1. Deny /copy-src/secret, /rename-src/secret and /delete-src/secret, leave the three parent directories accessible, and place a marker file in each denied directory.
  2. As the restricted user, request each denied descendant through the resource API. All three return 403.
  3. PATCH /api/resources/copy-src/?action=copy&destination=/dst returns 200, and the marker is readable at its new path.
  4. PATCH /api/resources/rename-src/?action=rename&destination=/moved returns 200, and the marker is readable at its new path.
  5. DELETE /api/resources/delete-src/ returns 204, and the denied marker file no longer exists.

Impact

An authenticated user holding ordinary create, rename or delete permission can read, relocate or destroy files the rules deny them, defeating rule-based isolation for confidentiality and integrity alike.

Patches

Fixed in v2.63.22. Copy, rename and delete now walk the source tree — and the location that tree would land on — before mutating anything, and reject the whole operation with 403 if any path is denied. The walk consults the rules only: hiding dotfiles is a display preference, and must not stop a user from moving a directory that contains one.

Workarounds

None. Until you can upgrade, withhold create, rename and delete permission from users whose rules deny descendants of directories they may otherwise operate on.

References

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

CVE ID

CVE-2026-73612

Weaknesses

No CWEs

Credits