CVE-2026-32104: StudioCMS IDOR Vulnerability

MODERATE
Advisory Identifier: GHSA-9v82-xrm4-mp52
CVSS 5.4
CWE-639
Published
Advisory Summary

CVE-2026-32104 is a MODERATE (CVSS 5.4) idor vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting StudioCMS libraries in the npm ecosystem. The issue involves idor in user notification preferences allows any authenticated user to modify any user's settings. Remediation is available by upgrading affected packages to version 0.4.3.

CVE-2026-32104 at a Glance

CVE Identifier CVE-2026-32104
GHSA Identifier GHSA-9v82-xrm4-mp52
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product StudioCMS
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.4

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:L).

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 Low (A:L)

How to Fix CVE-2026-32104

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-32104, 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-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 `updateUserNotifications` endpoint accepts a user ID from the request payload and uses it to update that user's notification preferences. It checks that the caller is logged in but never verifies that the caller owns the target account (`id !== userData.user.id`). Any authenticated visitor can modify notification preferences for any user, including disabling admin notifications to suppress detection of malicious activity. ## Details The vulnerable handler is in `packages/studiocms/frontend/pages/studiocms_api/_handlers/dashboard/users.ts:257-311`: ```typescript .handle( 'updateUserNotifications', Effect.fn(function* ({ payload: { id, notifications } }) { // ...demo mode checks... const [sdk, userData] = yield* Effect.all([SDKCore, CurrentUser]); // Line 274: Only checks login + visitor level — any authenticated user passes if (!userData.isLoggedIn || !userData.userPermissionLevel.isVisitor) { return yield* new DashboardAPIError({ error: 'Unauthorized' }); } // Line 280: Uses 'id' from payload — NOT userData.user.id const existingUser = yield* sdk.GET.users.byId(id); // Line 288: Updates target user using attacker-controlled 'id' const updatedData = yield* sdk.AUTH.user.update({ userId: id, // ← attacker controls this userData: { id, // ← attacker controls this name: existingUser.name, username: existingUser.username, updatedAt: new Date().toISOString(), emailVerified: existingUser.emailVerified, createdAt: undefined, notifications, // ← attacker controls this }, }); }) ) ``` For comparison, the `updateUserProfile` handler in `dashboard/profile.ts` correctly uses `userData.user.id` instead of a user-supplied ID, preventing IDOR. ## PoC ```bash # 1. Log in as a visitor-role user, obtain session cookie # 2. Disable all notifications for the admin user curl -X POST 'http://localhost:4321/studiocms_api/dashboard/update-user-notifications' \ -H 'Cookie: studiocms-session=<visitor-session-token>' \ -H 'Content-Type: application/json' \ -d '{ "id": "<admin-user-id>", "notifications": "" }' # Expected: 403 Forbidden # Actual: 200 {"message":"User notifications updated successfully"} ``` ## Impact - Any authenticated visitor can disable notification preferences for admin/owner accounts, suppressing alerts about new user creation, account changes, and user deletions - Enables attack chaining — suppress admin notifications first, then perform other malicious actions with reduced detection risk - Can modify any user's notification preferences (enable unwanted notifications or disable critical ones) ## Recommended Fix Add an ownership check in `packages/studiocms/frontend/pages/studiocms_api/_handlers/dashboard/users.ts`: ```typescript // After the login check at line 274, add: if (id !== userData.user?.id && !userData.userPermissionLevel.isAdmin) { return yield* new DashboardAPIError({ error: 'Unauthorized: cannot modify another user\'s notification preferences', }); } ```

CVE-2026-32104 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-32104?
CVE-2026-32104 is a security vulnerability in StudioCMS involving IDOR in User Notification Preferences Allows Any Authenticated User to Modify Any User's Settings under CWE-639: Authorization Bypass Through User-Controlled Key.
Which StudioCMS versions are affected?
Affected versions include releases prior to 0.4.3 across affected packages: studiocms.
What version fixes CVE-2026-32104?
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-32104?
CVE-2026-32104 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2026-32104?
CVE-2026-32104 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-32104?
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-9v82-xrm4-mp52",
  "modified" : "2026-03-12T14:49:41Z",
  "published" : "2026-03-12T14:49:41Z",
  "aliases" : [ "CVE-2026-32104" ],
  "summary" : "StudioCMS: IDOR in User Notification Preferences Allows Any Authenticated User to Modify Any User's Settings",
  "details" : "## Summary\n\nThe `updateUserNotifications` endpoint accepts a user ID from the request payload and uses it to update that user's notification preferences. It checks that the caller is logged in but never verifies that the caller owns the target account (`id !== userData.user.id`). Any authenticated visitor can modify notification preferences for any user, including disabling admin notifications to suppress detection of malicious activity.\n\n## Details\n\nThe vulnerable handler is in `packages/studiocms/frontend/pages/studiocms_api/_handlers/dashboard/users.ts:257-311`:\n\n```typescript\n.handle(\n    'updateUserNotifications',\n    Effect.fn(function* ({ payload: { id, notifications } }) {\n        // ...demo mode checks...\n\n        const [sdk, userData] = yield* Effect.all([SDKCore, CurrentUser]);\n\n        // Line 274: Only checks login + visitor level — any authenticated user passes\n        if (!userData.isLoggedIn || !userData.userPermissionLevel.isVisitor) {\n            return yield* new DashboardAPIError({ error: 'Unauthorized' });\n        }\n\n        // Line 280: Uses 'id' from payload — NOT userData.user.id\n        const existingUser = yield* sdk.GET.users.byId(id);\n\n        // Line 288: Updates target user using attacker-controlled 'id'\n        const updatedData = yield* sdk.AUTH.user.update({\n            userId: id,       // ← attacker controls this\n            userData: {\n                id,            // ← attacker controls this\n                name: existingUser.name,\n                username: existingUser.username,\n                updatedAt: new Date().toISOString(),\n                emailVerified: existingUser.emailVerified,\n                createdAt: undefined,\n                notifications,  // ← attacker controls this\n            },\n        });\n    })\n)\n```\n\nFor comparison, the `updateUserProfile` handler in `dashboard/profile.ts` correctly uses `userData.user.id` instead of a user-supplied ID, preventing IDOR.\n\n## PoC\n\n```bash\n# 1. Log in as a visitor-role user, obtain session cookie\n\n# 2. Disable all notifications for the admin user\ncurl -X POST 'http://localhost:4321/studiocms_api/dashboard/update-user-notifications' \\\n  -H 'Cookie: studiocms-session=<visitor-session-token>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"id\": \"<admin-user-id>\",\n    \"notifications\": \"\"\n  }'\n\n# Expected: 403 Forbidden\n# Actual: 200 {\"message\":\"User notifications updated successfully\"}\n```\n\n## Impact\n\n- Any authenticated visitor can disable notification preferences for admin/owner accounts, suppressing alerts about new user creation, account changes, and user deletions\n- Enables attack chaining — suppress admin notifications first, then perform other malicious actions with reduced detection risk\n- Can modify any user's notification preferences (enable unwanted notifications or disable critical ones)\n\n## Recommended Fix\n\nAdd an ownership check in `packages/studiocms/frontend/pages/studiocms_api/_handlers/dashboard/users.ts`:\n\n```typescript\n// After the login check at line 274, add:\nif (id !== userData.user?.id && !userData.userPermissionLevel.isAdmin) {\n    return yield* new DashboardAPIError({\n        error: 'Unauthorized: cannot modify another user\\'s notification preferences',\n    });\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/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-9v82-xrm4-mp52"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32104"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/withstudiocms/studiocms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-12T14:49:41Z",
    "nvd_published_at" : "2026-03-11T21:16:16Z"
  }
}