/

CVE-2026-30945

Severity:

HIGH RISK

(7.1)

Broken Access Control / Insecure Direct Object Reference

CVE-2026-30945

Analyzed

Vulnerability type

Category:

Broken Access Control / Insecure Direct Object Reference

CWE:

CWE-639, CWE-863

Impact:

Privilege Abuse and Targeted Denial of Service

Severity:

HIGH RISK

(7.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

StudioCMS exposed an API token deletion endpoint that allowed any authenticated editor-level user to revoke API tokens for any other account, including admins and owners.

Because the endpoint trusted tokenID and userID from the request without verifying ownership or role hierarchy, attackers could disrupt critical integrations and automations by deleting others' tokens.

Affected context

This vulnerability occurs in StudioCMS deployments that:

  • Expose the DELETE /studiocms_api/dashboard/api-tokens endpoint to authenticated users with editor or higher roles
  • Use API tokens to power external integrations, automations, or programmatic access
  • Rely on the backend to enforce token ownership and role-based restrictions

The risk is elevated in environments where non-admin users routinely manage content but should not affect other users' API tokens.

Exploit preconditions

  • Attack surface: HTTP API endpoint at DELETE /studiocms_api/dashboard/api-tokens
  • Required access: Any authenticated account with editor privileges or above
  • Trigger point: Sending a crafted DELETE request that includes the tokenID (and optionally userID) of a token owned by another user
  • Why exploitation is possible: The handler accepts tokenID and userID directly from the request payload and performs deletion without:
  • Verifying that the caller owns the token
  • Ensuring the caller's role is sufficiently privileged relative to the target user
  • Enforcing object-level access control on API tokens

Why this happens

The core issue maps to CWE-639: Insecure Direct Object Reference combined with CWE-863: Incorrect Authorization.

The API endpoint directly uses client-supplied identifiers (tokenID, userID) as references to sensitive objects (API tokens), assuming that any authenticated editor-level caller is allowed to operate on those objects.

Because the server does not perform ownership checks or robust authorization decisions tied to the authenticated identity and role hierarchy, users can manipulate identifiers in requests to affect resources they do not control.

This pattern exemplifies broken access control: trusting user-provided identifiers to select security-sensitive resources without enforcing object-level permissions.

Potential impact

  • Deletion of API tokens belonging to admin and owner accounts
  • Targeted denial of service against critical integrations relying on those tokens
  • Disruption of scheduled automations and background jobs
  • Operational downtime for dependent services or workflows
  • Erosion of auditability when tokens are removed without proper authorization trails

General mitigation guidance

Effective mitigation focuses on enforcing strict object-level authorization and minimizing trust in client-supplied identifiers:

  • Bind API token operations to the authenticated user context on the server side, deriving the acting user from the session or token rather than request payload fields.
  • Enforce ownership checks so that a user can only delete tokens they own, unless explicitly granted higher administrative privileges.
  • Implement role-aware access control rules that prevent lower-privileged roles (e.g., editor) from modifying resources owned by higher-privileged roles (e.g., admin, owner).
  • Avoid accepting raw userID in mutation endpoints when the identity can be inferred from authentication; treat any cross-user operations as an explicit, restricted administrative capability.
  • Centralize authorization logic in reusable helpers or middleware so that all resource operations consistently apply the same access control rules.

How teams detect issues like this

Detecting this class of vulnerability typically involves both code-focused and behavior-focused approaches:

  • Code review patterns:
  • Look for endpoints that accept object identifiers (e.g., tokenID, userID) from client input and perform create/update/delete operations without ownership or role checks.
  • Flag controller or handler functions where authorization is performed only at the route level (role-based) but not at the object level (resource ownership).
  • Static analysis:
  • Use rules or custom queries to identify handlers that:
  • Use user-controlled IDs to query or mutate sensitive tables (tokens, users, permissions) and
  • Lack calls to centralized authorization or policy-check functions.
  • Runtime monitoring:
  • Log and analyze API calls that delete tokens, correlating the authenticated user ID with the target userID/tokenID to highlight cross-account deletions.
  • Configure anomaly detection to alert on unusual patterns, such as an editor account deleting multiple tokens for other users.
  • Policy enforcement:
  • Introduce an authorization layer or policy engine (e.g., RBAC/ABAC middleware) that explicitly enforces ownership and role hierarchy for resource actions.

Sources

SourceLink
github.comgithub.com/withstudiocms/studiocms/commit/9eec9c3b45523b635cfe16d55aa55afabacbebe3
github.comgithub.com/withstudiocms/studiocms/releases/tag/studiocms@0.4.0
github.comgithub.com/withstudiocms/studiocms/security/advisories/GHSA-8rgj-vrfr-6hqr

Frequently asked

questions

Yes. Any user who can authenticate to the StudioCMS instance with at least editor privileges and can reach the dashboard API can exploit this over the network by issuing crafted DELETE requests.

The attacker needs valid credentials for an account with editor privileges or higher. No administrative privileges are required, and the attacker does not need direct access to the victim's account—only knowledge or discovery of target token identifiers.

The most robust fix is to enforce strict object-level authorization: derive the acting user from the authenticated session, verify that they own or are explicitly permitted to manage the targeted token, and restrict cross-user operations to narrowly scoped administrative paths with clear policy checks.

Adopt a centralized authorization model where every resource operation passes through consistent policy checks, avoid trusting client-supplied user or object IDs for authorization decisions, use defense-in-depth with both role-based and ownership checks, and incorporate security-focused code review and automated analysis rules targeting broken access control patterns.

Find out what's already
exploitable in your codebase.