CVE-2026-30945: StudioCMS Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-8rgj-vrfr-6hqr
CVSS 7.1
CWE-639
Published
Advisory Summary

CVE-2026-30945 is a HIGH (CVSS 7.1) denial of service vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting StudioCMS libraries in the npm ecosystem. The issue involves idor — arbitrary api token revocation leading to denial of service. Remediation is available by upgrading affected packages to version 0.4.0.

CVE-2026-30945 at a Glance

CVE Identifier CVE-2026-30945
GHSA Identifier GHSA-8rgj-vrfr-6hqr
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product StudioCMS
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability High (A:H)

How to Fix CVE-2026-30945

To remediate this vulnerability, upgrade all affected StudioCMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

studiocms fixed: 0.4.0
npm install studiocms@0.4.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls studiocms

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-30945, inspect your project dependencies using npm:

npm ls studiocms

Analyze the terminal output to locate any version of StudioCMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.0), your application is affected.

Note: The npm ls studiocms command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In StudioCMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The DELETE /studiocms_api/dashboard/api-tokens endpoint allows any authenticated user with editor privileges or above to revoke API tokens belonging to any other user, including admin and owner accounts. The handler accepts tokenID and userID directly from the request payload without verifying token ownership, caller identity, or role hierarchy. This enables targeted denial of service against critical integrations and automations. ## Details #### Vulnerable Code The following is the server-side handler for the `DELETE /studiocms_api/dashboard/api-tokens` endpoint (`revokeApiToken`): **File:** packages/studiocms/frontend/pages/studiocms_api/dashboard/api-tokens.ts (lines 58–99) **Version:** studiocms@0.3.0 ``` DELETE: (ctx) => genLogger('studiocms/routes/api/dashboard/api-tokens.DELETE')(function* () { const sdk = yield* SDKCore; // Check if demo mode is enabled if (developerConfig.demoMode !== false) { return apiResponseLogger(403, 'Demo mode is enabled, this action is not allowed.'); } // Get user data const userData = ctx.locals.StudioCMS.security?.userSessionData; // [1] // Check if user is logged in if (!userData?.isLoggedIn) { // [2] return apiResponseLogger(403, 'Unauthorized'); } // Check if user has permission const isAuthorized = ctx.locals.StudioCMS.security?.userPermissionLevel.isEditor; // [3] if (!isAuthorized) { return apiResponseLogger(403, 'Unauthorized'); } // Get Json Data const jsonData = yield* readAPIContextJson<{ tokenID: string; // [4] userID: string; // [5] }>(ctx); // Validate form data if (!jsonData.tokenID) { return apiResponseLogger(400, 'Invalid form data, tokenID is required'); } if (!jsonData.userID) { return apiResponseLogger(400, 'Invalid form data, userID is required'); } // [6] Both user-controlled values passed directly — no ownership or identity checks yield* sdk.REST_API.tokens.delete({ tokenId: jsonData.tokenID, userId: jsonData.userID }); return apiResponseLogger(200, 'Token deleted'); // [7] }), ``` **Analysis** The handler shares the same class of authorization flaws found in the token generation endpoint, applied to a destructive operation: 1. **Insufficient permission gate [1][2][3]:** The handler retrieves the session from ctx.locals.StudioCMS.security and only checks isEditor. Token revocation is a high-privilege operation that should require ownership of the token or elevated administrative privileges — not a generic editor-level gate. 2. **No token ownership validation [4][6]:** The handler does not verify that jsonData.tokenID actually belongs to the jsonData.userID supplied in the payload. An attacker could enumerate or guess token IDs and revoke them regardless of ownership. 3. **Missing caller identity check [5][6]:** The jsonData.userID from the payload is never compared against userData (the authenticated caller from [1]). Any editor can specify an arbitrary target user UUID and revoke their tokens. 4. **No role hierarchy enforcement [6]:** There is no check preventing a lower-privileged user (editor) from revoking tokens belonging to higher-privileged accounts (admin, owner). 5. **Direct pass-through to destructive operation [6][7]:** Both user-controlled parameters are passed directly to sdk.REST_API.tokens.delete() without any server-side validation, and the server responds with a generic success message, making this a textbook IDOR. ## PoC **Environment** *User ID | Role* 2450bf33-0135-4142-80be-9854f9a5e9f1 | owner 39b3e7d3-5eb0-48e1-abdc-ce95a57b212c | editor **Attack — Editor Revokes Owner's API Token** An authenticated editor sends the following request to revoke a token belonging to the owner: ``` DELETE /studiocms_api/dashboard/api-tokens HTTP/1.1 Host: 127.0.0.1:4321 Cookie: auth_session=<editor_session_cookie> Content-Type: application/json Accept: application/json Content-Length: 98 { "tokenID": "16a2e549-513b-40ac-8ca3-858af6118afc", "userID": "2450bf33-0135-4142-80be-9854f9a5e9f1" } ``` **Response (HTTP 200):** ``` {"message":"Token deleted"} ``` The server confirmed deletion of the owner's token. The tokenID here refers to the internal token record identifier (UUID), not the JWT value itself. The editor's session cookie was sufficient to authorize this destructive action against a higher-privileged user. ## Impact - **Denial of Service on integrations:** API tokens used in CI/CD pipelines, third-party integrations, or monitoring systems can be silently revoked, causing automated workflows to fail without warning. - **No audit trail:** The revocation is processed as a legitimate operation — the only evidence is the editor's own session, making attribution difficult without detailed request logging.

CVE-2026-30945 Affected StudioCMS Versions

1 component(s)
Fixed Versions:
0.4.0
Product / Package Ecosystem Affected Versions Fixed Version
studiocms
npm
< 0.4.0
0.4.0

References

Frequently Asked Questions

What is CVE-2026-30945?
CVE-2026-30945 is a security vulnerability in StudioCMS involving IDOR — Arbitrary API Token Revocation Leading to Denial of Service under CWE-639: Authorization Bypass Through User-Controlled Key.
Which StudioCMS versions are affected?
Affected versions include releases prior to 0.4.0 across affected packages: studiocms.
What version fixes CVE-2026-30945?
Upgrading to 0.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is studiocms affected?
Yes, studiocms is affected in releases prior to 0.4.0. Upgrade your dependency to 0.4.0 or later.
What is the CVSS score of CVE-2026-30945?
CVE-2026-30945 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H.
What CWE is associated with CVE-2026-30945?
CVE-2026-30945 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check npm dependencies for CVE-2026-30945?
Run the dependency tree command: 'npm ls studiocms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8rgj-vrfr-6hqr",
  "modified" : "2026-03-11T00:16:41Z",
  "published" : "2026-03-11T00:16:41Z",
  "aliases" : [ "CVE-2026-30945" ],
  "summary" : "StudioCMS: IDOR — Arbitrary API Token Revocation Leading to Denial of Service",
  "details" : "## Summary\nThe DELETE /studiocms_api/dashboard/api-tokens endpoint allows any authenticated user with editor privileges or above to revoke API tokens belonging to any other user, including admin and owner accounts. The handler accepts tokenID and userID directly from the request payload without verifying token ownership, caller identity, or role hierarchy. This enables targeted denial of service against critical integrations and automations.\n\n## Details\n#### Vulnerable Code\nThe following is the server-side handler for the `DELETE /studiocms_api/dashboard/api-tokens` endpoint (`revokeApiToken`):\n\n**File:** packages/studiocms/frontend/pages/studiocms_api/dashboard/api-tokens.ts (lines 58–99)\n**Version:** studiocms@0.3.0\n```\nDELETE: (ctx) =>\n    genLogger('studiocms/routes/api/dashboard/api-tokens.DELETE')(function* () {\n        const sdk = yield* SDKCore;\n\n        // Check if demo mode is enabled\n        if (developerConfig.demoMode !== false) {\n            return apiResponseLogger(403, 'Demo mode is enabled, this action is not allowed.');\n        }\n\n        // Get user data\n        const userData = ctx.locals.StudioCMS.security?.userSessionData;       // [1]\n\n        // Check if user is logged in\n        if (!userData?.isLoggedIn) {                                            // [2]\n            return apiResponseLogger(403, 'Unauthorized');\n        }\n\n        // Check if user has permission\n        const isAuthorized = ctx.locals.StudioCMS.security?.userPermissionLevel.isEditor;  // [3]\n        if (!isAuthorized) {\n            return apiResponseLogger(403, 'Unauthorized');\n        }\n\n        // Get Json Data\n        const jsonData = yield* readAPIContextJson<{\n            tokenID: string;                                                    // [4]\n            userID: string;                                                     // [5]\n        }>(ctx);\n\n        // Validate form data\n        if (!jsonData.tokenID) {\n            return apiResponseLogger(400, 'Invalid form data, tokenID is required');\n        }\n\n        if (!jsonData.userID) {\n            return apiResponseLogger(400, 'Invalid form data, userID is required');\n        }\n\n        // [6] Both user-controlled values passed directly — no ownership or identity checks\n        yield* sdk.REST_API.tokens.delete({ tokenId: jsonData.tokenID, userId: jsonData.userID });\n\n        return apiResponseLogger(200, 'Token deleted');                         // [7]\n    }),\n```\n**Analysis**\nThe handler shares the same class of authorization flaws found in the token generation endpoint, applied to a destructive operation:\n1. **Insufficient permission gate [1][2][3]:** The handler retrieves the session from ctx.locals.StudioCMS.security and only checks isEditor. Token revocation is a high-privilege operation that should require ownership of the token or elevated administrative privileges — not a generic editor-level gate.\n2. **No token ownership validation [4][6]:** The handler does not verify that jsonData.tokenID actually belongs to the jsonData.userID supplied in the payload. An attacker could enumerate or guess token IDs and revoke them regardless of ownership.\n3. **Missing caller identity check [5][6]:** The jsonData.userID from the payload is never compared against userData (the authenticated caller from [1]). Any editor can specify an arbitrary target user UUID and revoke their tokens.\n4. **No role hierarchy enforcement [6]:** There is no check preventing a lower-privileged user (editor) from revoking tokens belonging to higher-privileged accounts (admin, owner).\n5. **Direct pass-through to destructive operation [6][7]:** Both user-controlled parameters are passed directly to sdk.REST_API.tokens.delete() without any server-side validation, and the server responds with a generic success message, making this a textbook IDOR.\n\n## PoC\n**Environment**\n*User ID | Role*\n2450bf33-0135-4142-80be-9854f9a5e9f1 | owner\n39b3e7d3-5eb0-48e1-abdc-ce95a57b212c | editor\n\n**Attack — Editor Revokes Owner's API Token**\nAn authenticated editor sends the following request to revoke a token belonging to the owner:\n```\nDELETE /studiocms_api/dashboard/api-tokens HTTP/1.1\nHost: 127.0.0.1:4321\nCookie: auth_session=<editor_session_cookie>\nContent-Type: application/json\nAccept: application/json\nContent-Length: 98\n\n{\n  \"tokenID\": \"16a2e549-513b-40ac-8ca3-858af6118afc\",\n  \"userID\": \"2450bf33-0135-4142-80be-9854f9a5e9f1\"\n}\n```\n\n**Response (HTTP 200):**\n```\n{\"message\":\"Token deleted\"}\n```\nThe server confirmed deletion of the owner's token. The tokenID here refers to the internal token record identifier (UUID), not the JWT value itself. The editor's session cookie was sufficient to authorize this destructive action against a higher-privileged user.\n\n## Impact\n- **Denial of Service on integrations:** API tokens used in CI/CD pipelines, third-party integrations, or monitoring systems can be silently revoked, causing automated workflows to fail without warning.\n- **No audit trail:** The revocation is processed as a legitimate operation — the only evidence is the editor's own session, making attribution difficult without detailed request logging.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "studiocms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.3.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/withstudiocms/studiocms/security/advisories/GHSA-8rgj-vrfr-6hqr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30945"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/withstudiocms/studiocms/commit/9eec9c3b45523b635cfe16d55aa55afabacbebe3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/withstudiocms/studiocms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/withstudiocms/studiocms/releases/tag/studiocms@0.4.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-11T00:16:41Z",
    "nvd_published_at" : "2026-03-10T18:18:54Z"
  }
}