Skip to content

fix: resolve cross-workspace IDOR in workspace management endpoints#47

Merged
christianmat merged 1 commit into
mainfrom
fix/workspace-idor-vulnerability
Apr 6, 2026
Merged

fix: resolve cross-workspace IDOR in workspace management endpoints#47
christianmat merged 1 commit into
mainfrom
fix/workspace-idor-vulnerability

Conversation

@christianmat
Copy link
Copy Markdown
Contributor

@christianmat christianmat commented Apr 6, 2026

Summary

  • Fixes a security vulnerability (CWE-639) where workspace management endpoints accepted arbitrary workspaceId from URL params, allowing any authenticated admin to read/update/delete other workspaces
  • Replaced @Param('workspaceId') with getWorkspace(request) on GET, PUT, and DELETE endpoints to scope operations to the authenticated workspace
  • Removed :workspaceId path parameter from routes — operations now implicitly target the caller's workspace, matching the pattern used by events and webhooks controllers

Closes #46

Test plan

  • Verify GET /workspaces returns the authenticated workspace's data
  • Verify PUT /workspaces updates only the authenticated workspace
  • Verify DELETE /workspaces deletes only the authenticated workspace
  • Confirm that cross-workspace access is no longer possible

Use getWorkspace(request) to scope GET/PUT/DELETE operations to the
authenticated workspace instead of accepting arbitrary workspaceId
from URL params. This matches the secure pattern used by events and
webhooks controllers.

Closes #46

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@christianmat christianmat merged commit 43add90 into main Apr 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: Cross-Workspace IDOR in Workspace Management Endpoints

1 participant