/

CVE-2026-50891

Severity:

HIGH RISK

(8.1)

Broken Access Control (CWE-284) in Filestash API

CVE-2026-50891

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-284

Impact:

Privilege Escalation

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Filestash v0.4.0 contains a broken access control flaw in the /admin/api/config endpoint, where administrative configuration actions are insufficiently protected.

An attacker can send crafted requests to this API to gain elevated privileges and access functions intended only for administrators.

Affected context

This vulnerability appears in Filestash deployments exposing the /admin/api/config component over HTTP or HTTPS.

It is relevant when the administrative API is reachable from untrusted networks or partially trusted users and when the application does not reliably enforce role checks or session validation on this endpoint.

Environments that reuse sessions, rely on client-side checks, or share infrastructure between admin and regular interfaces are more exposed.

Exploit preconditions

  • Attack surface: HTTP(S) interface of the Filestash server, specifically the /admin/api/config route.
  • Required access: Network-level access to the Filestash instance and the ability to send arbitrary HTTP requests; no valid admin account may be required if access control is bypassed.
  • Trigger point: Submitting crafted requests to the admin configuration API that the server incorrectly treats as authorized.
  • Why exploitation is possible: The endpoint lacks robust server-side authorization checks, allowing non-admin users or unauthenticated callers to perform actions reserved for higher-privileged roles.

Why this happens

The underlying issue falls under CWE-284: Improper Access Control, where the application fails to enforce correct permissions on sensitive operations.

In this case, the /admin/api/config endpoint appears to rely on incomplete, missing, or misapplied authorization logic.

This may manifest as relying solely on client-side controls, weak role checks, or reusing a common handler without verifying the caller's privilege level before processing configuration changes.

The abstract pattern is that administrative functionality is exposed through a URL without strict, consistent server-side enforcement of who can invoke it.

Potential impact

  • Attackers can gain administrative or higher-level privileges within Filestash.
  • Configuration settings may be altered, potentially weakening security or enabling additional attack vectors.
  • Sensitive information stored in configuration, such as connection details or credentials, can be exposed.
  • The integrity and availability of stored data and connected back-end services can be compromised through misconfiguration.

General mitigation guidance

Mitigation generally focuses on enforcing strong server-side authorization for all administrative endpoints and actions.

Common patterns include:

  • Applying consistent role-based access control (RBAC) checks to every admin API route and verifying the user's role on each request.
  • Requiring strong, authenticated sessions and rejecting requests without valid, non-expired authentication tokens.
  • Isolating administrative interfaces on separate network paths or hosts and restricting access to trusted operators.
  • Implementing least-privilege principles so that regular users and integration accounts cannot access configuration-modifying actions.
  • Centralizing authorization decisions in middleware or policy layers to reduce the chance of missing checks on individual endpoints.

How teams detect issues like this

Detection often combines code-level review with runtime monitoring:

  • Static analysis and manual code review can look for admin or configuration endpoints that lack explicit authorization checks or rely solely on client-controlled attributes.
  • Security tests and automated integration tests can attempt to call administrative APIs with non-privileged or unauthenticated identities and verify rejection.
  • Logging and monitoring can highlight suspicious use of admin APIs, such as configuration changes from unexpected IP ranges or normal user accounts.
  • Policy enforcement in CI/CD, such as requiring explicit access control annotations on sensitive controllers, can help prevent regressions.

Sources

SourceLink
gist.github.comgist.github.com/pyuysig/50dc365f54f95396bb67532f02b34bb0

Frequently asked

questions

Yes, if the Filestash instance exposes the /admin/api/config endpoint over the network, an attacker with network access can potentially exploit the issue remotely.

Typically, only network access to the Filestash server and the ability to send crafted HTTP requests are required; a valid administrative account may not be necessary if access control checks are weak or missing.

Enforce strict server-side authorization for all administrative endpoints, ensuring that only authenticated and properly authorized users can access /admin/api/config and related routes, ideally through centralized RBAC or policy checks.

Adopt a consistent access control strategy with centralized enforcement, require security reviews for any new admin or configuration endpoints, and include automated tests that verify non-privileged users cannot invoke administrative APIs.

Find out what's already
exploitable in your codebase.