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:
// 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:
// 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
# 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": "[email protected]",
"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
The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access. Typical impact: privilege escalation beyond the intended level.
CVE-2026-32106 has a CVSS score of 4.7 (Medium). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.4.3); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Replace string-based checks with indexOf comparison in packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts:
// 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',
});
}
Frequently Asked Questions
- What is CVE-2026-32106? CVE-2026-32106 is a medium-severity improper privilege management vulnerability in studiocms (npm), affecting versions <= 0.4.2. It is fixed in 0.4.3. The application assigns, modifies, tracks, or checks privileges incorrectly, allowing a user to gain elevated access.
- How severe is CVE-2026-32106? CVE-2026-32106 has a CVSS score of 4.7 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of studiocms are affected by CVE-2026-32106? studiocms (npm) versions <= 0.4.2 is affected.
- Is there a fix for CVE-2026-32106? Yes. CVE-2026-32106 is fixed in 0.4.3. Upgrade to this version or later.
- Is CVE-2026-32106 exploitable, and should I be worried? Whether CVE-2026-32106 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-32106 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-32106? Upgrade
studiocmsto 0.4.3 or later.