Summary
File Browser's public share handling logic incorrectly evaluates access rules against a rebased path, allowing blocked files under a shared directory to be accessed.
An attacker who knows a public share URL can, in some cases without authentication, retrieve files and subdirectories that the owner explicitly restricted, leading to unintended information disclosure.
Affected context
This vulnerability occurs in File Browser deployments that expose public shares and rely on global or per-user rules to restrict access to certain paths.
The issue arises when the application rebases the share owner's filesystem root to the shared directory and then evaluates authorization rules using this modified relative path, rather than the original path relative to the owner's full scope.
Under these conditions, files and subdirectories that were meant to be blocked, but reside under the shared directory, can still be accessed via the public share endpoints.
Exploit preconditions
- Attack surface: HTTP API endpoints handling public shares, such as
GET /api/public/share/*andGET /api/public/dl/*. - Required access: Knowledge of a valid public directory share URL; in typical scenarios, no authentication is required.
- Trigger point: Accessing descendant paths beneath the shared directory through the public share APIs.
- Why exploitation is possible: Authorization rules are evaluated against a rebased relative path rooted at the shared directory, causing blocked paths under that directory to appear allowed, effectively bypassing the owner's global and per-user restrictions.
Why this happens
The underlying bug is an authorization logic flaw where access control decisions are made on an incorrectly scoped path.
Instead of checking requested resources against the original path relative to the owner's configured filesystem scope, the code rebases the root to the shared directory and then applies rules to this narrower view.
This mismatch between the policy scope and the evaluated path maps to CWE-863: Incorrect Authorization, as the system mistakenly grants access to resources that should remain blocked when accessed through public share handlers.
Potential impact
- Unauthenticated users may access files that the owner explicitly blocked via global or per-user rules.
- Sensitive information stored under a shared directory could be disclosed unintentionally.
- Internal directory structure and metadata may be exposed, aiding further reconnaissance.
- Compliance or data protection policies can be undermined by unintended public access to restricted content.
General mitigation guidance
Mitigation should focus on ensuring authorization checks are performed against the correct, original scope of the resource rather than any rebased or transformed path.
Recommended defensive patterns include:
- Implement path-based authorization using an invariant canonical path that reflects the owner's full filesystem scope.
- Keep policy evaluation separate from presentation-layer path transformations (such as rebasing for shares).
- Apply deny-by-default rules for public shares, only allowing explicitly permitted paths that survive a canonicalization and rule check.
- Regularly review access control logic to ensure that sharing abstractions cannot bypass underlying restriction rules.
- Minimize exposure of public shares and avoid sharing directories that contain mixed sensitive and non-sensitive content.
How teams detect issues like this
Detection approaches can include:
- Static analysis rules or code review checklists that flag authorization decisions based on transformed or rebased paths instead of canonical resource identifiers.
- Tests that simulate access to explicitly blocked paths via alternate routing mechanisms, such as public share endpoints, to validate consistent enforcement of rules.
- Logging of authorization decisions that includes both the canonical path and the evaluated path, allowing auditors to spot mismatches.
- Security regression tests or policy-as-code frameworks that ensure per-user and global rules apply identically across all access channels, including public shares.

