2.7low
StudioCMS REST getUsers Exposes Owner Account Records to Admin Tokens
- Severity
- 2.7low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.42% (higher than 38% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xvf4-ch4q-2m24
Description
StudioCMS is a server-side-rendered, Astro native, headless content management system. Prior to 0.4.4, the REST API `getUsers` endpoint in StudioCMS uses the attacker-controlled `rank` query parameter to decide whether owner accounts should be filtered from the result set. As a result, an admin token can request `rank=owner` and receive owner account records, including IDs, usernames, display names, and email addresses, even though the adjacent `getUser` endpoint correctly blocks admins from viewing owner users. This is an authorization inconsistency inside the same user-management surface. Version 0.4.4 fixes the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| withstudiocms studiocms | < 0.4.4 | CVE List |
| studiocms (npm) | before 0.4.4 | GitHub Advisory Database |
| studiocms studiocms | before 0.4.4 | NVD |
All scores
| GitHub_M | 2.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 2.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
StudioCMS is a server-side-rendered, Astro native, headless content management system. Prior to 0.4.4, the REST API `getUsers` endpoint in StudioCMS uses the attacker-controlled `rank` query parameter to decide whether owner accounts should be filtered from the result set. As a result, an admin token can request `rank=owner` and receive owner account records, including IDs, usernames, display names, and email addresses, even though the adjacent `getUser` endpoint correctly blocks admins from viewing owner users. This is an authorization inconsistency inside the same user-management surface. Version 0.4.4 fixes the issue.
GitHub Advisory Database
Summary
The REST API getUsers endpoint in StudioCMS uses the attacker-controlled rank query parameter to decide whether owner accounts should be filtered from the result set. As a result, an admin token can request rank=owner and receive owner account records, including IDs, usernames, display names, and email addresses, even though the adjacent getUser endpoint correctly blocks admins from viewing owner users. This is an authorization inconsistency inside the same user-management surface.
Details
Vulnerable Code Path
File: D:/bugcrowd/studiocms/repo/packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts, lines 1605-1647
.handle(
'getUsers',
Effect.fn(
function* ({ urlParams: { name, rank, username } }) {
if (!restAPIEnabled) {
return yield* new RestAPIError({ error: 'Endpoint not found' });
}
const [sdk, user] = yield* Effect.all([SDKCore, CurrentRestAPIUser]);
if (user.rank !== 'owner' && user.rank !== 'admin') {
return yield* new RestAPIError({ error: 'Unauthorized' });
}
const allUsers = yield* sdk.GET.users.all();
let data = allUsers.map(...);
if (rank !== 'owner') {
data = data.filter((user) => user.rank !== 'owner');
}
if (rank) {
data = data.filter((user) => user.rank === rank);
}
return data;
},
The rank variable in if (rank !== 'owner') is the request query parameter, not the caller's privilege level. An admin can therefore pass rank=owner, skip the owner-filtering branch, and then have the second if (rank) branch return only owner accounts.
Adjacent Endpoint Shows Intended Security Boundary
File: D:/bugcrowd/studiocms/repo/packages/studiocms/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts, lines 1650-1710
const existingUserRankIndex = availablePermissionRanks.indexOf(existingUserRank);
const loggedInUserRankIndex = availablePermissionRanks.indexOf(user.rank);
if (loggedInUserRankIndex <= existingUserRankIndex) {
return yield* new RestAPIError({
error: 'Unauthorized to view user with higher rank',
});
}
getUser correctly blocks an admin from viewing an owner record. getUsers bypasses that boundary for bulk enumeration.
Sensitive Fields Returned
The getUsers response includes:
idemailnameusernamerank- timestamps and profile URL/avatar fields when present
This is enough to enumerate all owner accounts and target them for phishing, social engineering, or follow-on attacks against out-of-band workflows.
PoC
HTTP PoC
Use any admin-level REST API token:
curl -X GET 'http://localhost:4321/studiocms_api/rest/v1/secure/users?rank=owner' \
-H 'Authorization: Bearer <admin-api-token>'
Expected behavior:
- owner records should be excluded for admin callers, consistent with
getUser
Actual behavior:
- the response contains owner user objects, including email addresses and user IDs
Local Validation of the Exact Handler Logic
I validated the filtering logic locally with the same conditions used by getUsers and getUser.
Observed output:
{
"admin_getUsers_rank_owner": [
{
"email": "owner@example.test",
"id": "owner-1",
"name": "Site Owner",
"rank": "owner",
"username": "owner1"
}
],
"admin_getUser_owner": "Unauthorized to view user with higher rank"
}
This demonstrates the authorization mismatch clearly:
- bulk listing with
rank=ownerexposes owner records - direct access to a single owner record is denied
Impact
- Owner Account Enumeration: Admin tokens can recover owner user IDs, usernames, display names, and email addresses.
- Authorization Boundary Bypass: The REST collection endpoint bypasses the stricter per-record rank check already implemented by
getUser. - Chaining Value: Exposed owner contact data can support phishing, account-targeting, and admin-to-owner pivot attempts in deployments that treat owner identities as higher-trust principals.
Recommended Fix
Apply rank filtering based on the caller's role, not on the request query parameter, and reuse the same privilege rule as getUser.
Example fix:
const loggedInUserRankIndex = availablePermissionRanks.indexOf(user.rank);
data = data.filter((candidate) => {
const candidateRankIndex = availablePermissionRanks.indexOf(candidate.rank);
return loggedInUserRankIndex > candidateRankIndex;
});
if (rank) {
data = data.filter((candidate) => candidate.rank === rank);
}
At minimum, replace:
if (rank !== 'owner') {
data = data.filter((user) => user.rank !== 'owner');
}
with a check tied to user.rank rather than the query parameter.
NVD (es)
StudioCMS es un sistema de gestión de contenido sin cabeza, nativo de Astro y renderizado en el lado del servidor. Antes de la versión 0.4.4, el endpoint `getUsers` de la API REST en StudioCMS utiliza el parámetro de consulta `rank` controlado por el atacante para decidir si las cuentas de propietario deben filtrarse del conjunto de resultados. Como resultado, un token de administrador puede solicitar `rank=owner` y recibir registros de cuentas de propietario, incluyendo IDs, nombres de usuario, nombres para mostrar y direcciones de correo electrónico, a pesar de que el endpoint adyacente `getUser` bloquea correctamente a los administradores para que no vean a los usuarios propietarios. Esto es una inconsistencia de autorización dentro de la misma superficie de gestión de usuarios. La versión 0.4.4 soluciona el problema.
References
| https://github.com/withstudiocms/studiocms/security/advisories/GHSA-xvf4-ch4q-2m24 | exploit, mitigation, vendor-advisory, web | |
| https://github.com/withstudiocms/studiocms/commit/aebe8bcb3618bb07c6753e3f5c982c1fe6adea64 | patch, web | |
| https://github.com/withstudiocms/studiocms/releases/tag/studiocms@0.4.4 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-32638 | advisory | |
| https://github.com/withstudiocms/studiocms | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-32638 changed 2026-03-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xvf4-ch4q-2m24 changed 2026-03-18 | CC-BY-4.0 |
| NVD | CVE-2026-32638 changed 2026-06-17 | Public domain |