CVE-2026-32106: StudioCMS REST API Missing Rank Check Vulnerability

MODERATE
Advisory Identifier: GHSA-wj56-g96r-673q
CVSS 4.7
CWE-269
Published
Advisory Summary

CVE-2026-32106 is a MODERATE (CVSS 4.7) rest api missing rank check vulnerability (CWE-269: Improper Privilege Management) affecting StudioCMS libraries in the npm ecosystem. The issue involves rest api missing rank check allows admin to create peer admin accounts. Remediation is available by upgrading affected packages to version 0.4.3.

CVE-2026-32106 at a Glance

CVE Identifier CVE-2026-32106
GHSA Identifier GHSA-wj56-g96r-673q
Severity MODERATE
CVSS v3.1 Base Score 4.7
CWE Classification CWE-269: Improper Privilege Management
Affected Product StudioCMS
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.7

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

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

How to Fix CVE-2026-32106

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.3
npm install studiocms@0.4.3
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-32106, 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.3), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. 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 REST API `createUser` endpoint uses string-based rank checks that only block creating `owner` accounts, while the Dashboard API uses `indexOf`-based rank comparison that prevents creating users at or above your own rank. This inconsistency allows an admin to create additional admin accounts via the REST API, enabling privilege proliferation and persistence. ## Details The REST API handler in `packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts:1365-1378`: ```typescript // REST API — only blocks creating 'owner' if (newUserRank === 'owner' && rank !== 'owner') { return yield* new RestAPIError({ error: 'Unauthorized to create user with owner rank', }); } if (rank === 'admin' && newUserRank === 'owner') { return yield* new RestAPIError({ error: 'Unauthorized to create user with owner rank', }); } // Missing: no check preventing admin from creating admin // newUserRank='admin' passes all checks ``` The Dashboard API handler in `_handlers/dashboard/create.ts` uses the correct approach: ```typescript // Dashboard API — blocks creating users at or above own rank const callerPerm = availablePermissionRanks.indexOf(userData.permissionLevel); const targetPerm = availablePermissionRanks.indexOf(rank); if (targetPerm >= callerPerm) { return yield* new DashboardAPIError({ error: 'Unauthorized: insufficient permissions to assign target rank', }); } ``` With `availablePermissionRanks = ['unknown', 'visitor', 'editor', 'admin', 'owner']`: - Admin (index 3) creating admin (index 3): `3 >= 3` = blocked in Dashboard - In REST API: no such check — allowed ## PoC ```bash # 1. Use an admin-level API token # 2. Create a new admin user via REST API curl -X POST 'http://localhost:4321/studiocms_api/rest/v1/secure/users' \ -H 'Authorization: Bearer <admin-api-token>' \ -H 'Content-Type: application/json' \ -d '{ "username": "rogue_admin", "email": "rogue@attacker.com", "displayname": "Rogue Admin", "rank": "admin", "password": "StrongP@ssw0rd123" }' # Expected: 403 Forbidden (admin should not create peer admin accounts) # Actual: 200 with new admin user created ``` ## Impact - A compromised or rogue admin can create additional admin accounts as persistence mechanisms that survive password resets or token revocations - Inconsistent security model between Dashboard API and REST API creates confusion about intended authorization boundaries - Note: requires admin access (PR:H), which limits practical severity ## Recommended Fix Replace string-based checks with `indexOf` comparison in `packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts`: ```typescript // Before: if (newUserRank === 'owner' && rank !== 'owner') { ... } if (rank === 'admin' && newUserRank === 'owner') { ... } // After: const availablePermissionRanks = ['unknown', 'visitor', 'editor', 'admin', 'owner']; const callerPerm = availablePermissionRanks.indexOf(rank); const targetPerm = availablePermissionRanks.indexOf(newUserRank); if (targetPerm >= callerPerm) { return yield* new RestAPIError({ error: 'Unauthorized: insufficient permissions to assign target rank', }); } ```

CVE-2026-32106 Affected StudioCMS Versions

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

References

Frequently Asked Questions

What is CVE-2026-32106?
CVE-2026-32106 is a security vulnerability in StudioCMS involving REST API Missing Rank Check Allows Admin to Create Peer Admin Accounts under CWE-269: Improper Privilege Management.
Which StudioCMS versions are affected?
Affected versions include releases prior to 0.4.3 across affected packages: studiocms.
What version fixes CVE-2026-32106?
Upgrading to 0.4.3 (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.3. Upgrade your dependency to 0.4.3 or later.
What is the CVSS score of CVE-2026-32106?
CVE-2026-32106 has a CVSS v3.1 base score of 4.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-32106?
CVE-2026-32106 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check npm dependencies for CVE-2026-32106?
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-wj56-g96r-673q",
  "modified" : "2026-03-12T14:49:48Z",
  "published" : "2026-03-12T14:49:48Z",
  "aliases" : [ "CVE-2026-32106" ],
  "summary" : "StudioCMS: REST API Missing Rank Check Allows Admin to Create Peer Admin Accounts",
  "details" : "## Summary\n\nThe REST API `createUser` endpoint uses string-based rank checks that only block creating `owner` accounts, while the Dashboard API uses `indexOf`-based rank comparison that prevents creating users at or above your own rank. This inconsistency allows an admin to create additional admin accounts via the REST API, enabling privilege proliferation and persistence.\n\n## Details\n\nThe REST API handler in `packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts:1365-1378`:\n\n```typescript\n// REST API — only blocks creating 'owner'\nif (newUserRank === 'owner' && rank !== 'owner') {\n    return yield* new RestAPIError({\n        error: 'Unauthorized to create user with owner rank',\n    });\n}\n\nif (rank === 'admin' && newUserRank === 'owner') {\n    return yield* new RestAPIError({\n        error: 'Unauthorized to create user with owner rank',\n    });\n}\n\n// Missing: no check preventing admin from creating admin\n// newUserRank='admin' passes all checks\n```\n\nThe Dashboard API handler in `_handlers/dashboard/create.ts` uses the correct approach:\n\n```typescript\n// Dashboard API — blocks creating users at or above own rank\nconst callerPerm = availablePermissionRanks.indexOf(userData.permissionLevel);\nconst targetPerm = availablePermissionRanks.indexOf(rank);\n\nif (targetPerm >= callerPerm) {\n    return yield* new DashboardAPIError({\n        error: 'Unauthorized: insufficient permissions to assign target rank',\n    });\n}\n```\n\nWith `availablePermissionRanks = ['unknown', 'visitor', 'editor', 'admin', 'owner']`:\n- Admin (index 3) creating admin (index 3): `3 >= 3` = blocked in Dashboard\n- In REST API: no such check — allowed\n\n## PoC\n\n```bash\n# 1. Use an admin-level API token\n\n# 2. Create a new admin user via REST API\ncurl -X POST 'http://localhost:4321/studiocms_api/rest/v1/secure/users' \\\n  -H 'Authorization: Bearer <admin-api-token>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"username\": \"rogue_admin\",\n    \"email\": \"rogue@attacker.com\",\n    \"displayname\": \"Rogue Admin\",\n    \"rank\": \"admin\",\n    \"password\": \"StrongP@ssw0rd123\"\n  }'\n\n# Expected: 403 Forbidden (admin should not create peer admin accounts)\n# Actual: 200 with new admin user created\n```\n\n## Impact\n\n- A compromised or rogue admin can create additional admin accounts as persistence mechanisms that survive password resets or token revocations\n- Inconsistent security model between Dashboard API and REST API creates confusion about intended authorization boundaries\n- Note: requires admin access (PR:H), which limits practical severity\n\n## Recommended Fix\n\nReplace string-based checks with `indexOf` comparison in `packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts`:\n\n```typescript\n// Before:\nif (newUserRank === 'owner' && rank !== 'owner') { ... }\nif (rank === 'admin' && newUserRank === 'owner') { ... }\n\n// After:\nconst availablePermissionRanks = ['unknown', 'visitor', 'editor', 'admin', 'owner'];\nconst callerPerm = availablePermissionRanks.indexOf(rank);\nconst targetPerm = availablePermissionRanks.indexOf(newUserRank);\n\nif (targetPerm >= callerPerm) {\n    return yield* new RestAPIError({\n        error: 'Unauthorized: insufficient permissions to assign target rank',\n    });\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "studiocms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.4.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/withstudiocms/studiocms/security/advisories/GHSA-wj56-g96r-673q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32106"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/withstudiocms/studiocms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-12T14:49:48Z",
    "nvd_published_at" : "2026-03-11T21:16:16Z"
  }
}