/

CVE-2026-40937

Severity:

HIGH RISK

(8.3)

Missing Authorization in RustFS Event Handlers

CVE-2026-40937

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Privilege Escalation and Cross-Tenant Data Exposure via Notification Hijacking

Severity:

HIGH RISK

(8.3)

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

RustFS's admin notification target APIs perform authentication but skip authorization checks, allowing any authenticated non-admin user to call endpoints that should be restricted to administrators.

Under these conditions, an attacker can overwrite a shared, admin-defined notification target and redirect bucket event notifications to an attacker-controlled endpoint, enabling cross-tenant event interception and audit evasion.

Affected context

The vulnerability occurs in RustFS deployments that:

  • Expose the admin notification target APIs implemented in rustfs/src/admin/handlers/event.rs
  • Rely on access key + session token authentication to distinguish users
  • Use shared or centrally-managed notification targets for delivering bucket or object events
  • Assume that only admins can create, update, or delete notification targets

In this context, the four affected endpoints validate that a caller is authenticated but fail to verify that the caller is authorized to perform admin-level notification target management.

Exploit preconditions

  • Attack surface: RustFS admin API endpoints for notification target management.
  • Required access: Any valid, non-admin RustFS access key + session token that can reach the admin endpoint surface (e.g., due to misconfigured routing or shared API gateway).
  • Trigger point: Invocation of notification target create/update/delete/list operations in event.rs that call check_permissions but not validate_admin_request.
  • Why exploitation is possible: These handlers enforce authentication only; they do not associate the incoming request with a specific AdminAction and do not enforce role/privilege checks. As a result, non-admin users can perform admin-only operations on shared notification targets when they know or can guess the target name.

Why this happens

The root cause is a missing authorization check for sensitive admin operations, aligning with CWE-862: Missing Authorization.

In the RustFS admin module, most admin handlers follow a secure pattern:

  • Authenticate the request.
  • Call validate_admin_request with a specific AdminAction to enforce role-based authorization.

However, the notification target handlers in event.rs deviate from this pattern and rely solely on check_permissions, which validates only authentication (access key + session token) without confirming that the caller is allowed to perform admin notification configuration changes.

This inconsistent enforcement creates a gap where authenticated but non-privileged users can escalate their effective capabilities over shared infrastructure (notification targets) without any additional checks.

Potential impact

  • Non-admin users may overwrite shared admin-defined notification targets by name.
  • Attackers could redirect bucket and object event notifications to attacker-controlled endpoints.
  • Cross-tenant or cross-user event interception can occur, exposing metadata about operations, object identifiers, or related audit data.
  • Audit evasion is possible if security monitoring or compliance logging relies on trustworthy notification delivery.
  • Indirect data leakage may occur if event payloads contain sensitive per-object or per-bucket information.
  • Operational disruption can result from misdirected notifications, breaking workflows that depend on accurate event delivery.

General mitigation guidance

Effective mitigation centers on enforcing consistent, explicit authorization checks for all admin-level operations:

  • Apply a uniform authorization layer to all admin handlers, ensuring that every entry point invokes a function equivalent to validate_admin_request with the correct AdminAction.
  • Treat notification target management (creation, update, deletion, listing of shared targets) as privileged operations that require admin-level roles or capabilities.
  • Use role-based access control (RBAC) or capability-based checks that clearly differentiate admin accounts from regular users and service identities.
  • Define and enforce a least-privilege model for API keys and session tokens, limiting which principals can reach admin endpoints at all.
  • Centralize permission checks in shared middleware or framework components to avoid handler-specific omissions.
  • When designing multi-tenant notification infrastructure, separate per-tenant "user-owned" targets from shared or global "admin-owned" targets and enforce distinct permission policies for each.
  • Introduce secure-by-default API gateway configuration that restricts exposure of admin paths to dedicated, hardened channels.

How teams detect issues like this

Detection can leverage both code-level and runtime perspectives:

  • Static analysis:
  • Search for admin handler functions under rustfs/src/admin/ that call authentication helpers (e.g., check_permissions) but do not call validate_admin_request or equivalent authorization routines.
  • Flag handlers that mutate global or shared configuration (such as notification targets) without explicit role or action checks.
  • Code review signals:
  • Require that each admin endpoint be associated with a named AdminAction or explicit RBAC policy.
  • Use checklists during review to verify that all new or modified admin handlers include both authentication and authorization logic.
  • Policy enforcement:
  • Implement CI/CD rules that fail builds when code in admin modules omits required authorization calls.
  • Employ automated code review tools or linters configured to detect patterns like "admin route without admin validator."
  • Runtime monitoring:
  • Log all notification target configuration changes with actor identity and role, and alert on unusual patterns (e.g., non-admin principals modifying shared targets).
  • Monitor for repeated changes to notification destinations, especially to unfamiliar or external endpoints.

Sources

SourceLink
github.comgithub.com/rustfs/rustfs/releases/tag/1.0.0-alpha.94
github.comgithub.com/rustfs/rustfs/security/advisories/GHSA-pfcq-4gjr-6gjm

Frequently asked

questions

Exploitability is high in environments where non-admin users can reach the admin notification target endpoints. If such access is available, a non-admin user can typically modify shared notification targets with only their regular access key and session token.

No. The issue arises specifically because admin-level authorization is missing. Any authenticated non-admin user who can send requests to the affected endpoints can attempt to overwrite or manipulate shared notification targets.

The safest fix is to ensure all admin handlers—including notification-related ones—invoke a central authorization routine (such as validate_admin_request) with a defined action or role requirement. This should be enforced consistently and ideally via shared middleware or framework components rather than per-handler ad hoc checks.

Prevention hinges on standardizing access control: define a clear admin API surface, require a common authorization mechanism for all admin routes, incorporate automated tests and CI rules that verify the presence of authorization calls, and conduct security-focused code reviews that specifically inspect access control for new or changed endpoints.

Find out what's already
exploitable in your codebase.