Skip to content

fix IDOR cross organization PROJECT_GET#2483

Open
0xcucumbersalad wants to merge 4 commits intodecocms:mainfrom
0xcucumbersalad:fix-project-get-cross-organization
Open

fix IDOR cross organization PROJECT_GET#2483
0xcucumbersalad wants to merge 4 commits intodecocms:mainfrom
0xcucumbersalad:fix-project-get-cross-organization

Conversation

@0xcucumbersalad
Copy link
Contributor

@0xcucumbersalad 0xcucumbersalad commented Feb 23, 2026

What is this contribution about?

This PR fixes a cross-organization access control issue in the GET project endpoint.

Previously, it was possible to retrieve project data across organizations by manipulating identifiers, without properly validating that the authenticated user belonged to the same organization as the requested project. This created a potential authorization bypass / cross-tenant data exposure risk.

Changes made:

  • Added strict organization scoping when fetching projects.
  • Added proper authorization checks before returning project data.

Why this is needed:

Mesh is a multi-tenant system. Allowing cross-organization access breaks tenant isolation and may lead to sensitive data exposure. This fix enforces proper tenant boundaries and strengthens overall security.


Summary by cubic

Fix cross-organization access in the GET project tool by scoping lookups to the authenticated organization. Prevents IDOR and cross-tenant data exposure.

  • Bug Fixes
    • Removed organizationId from input and use the current session org (ctx.organization.id) for slug lookups; fixed a formatting test.
    • Throw a clear error when organization context is missing to prevent insecure cross-org lookups.

Written for commit e5a78e1. Summary will update on new commits.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

Release Options

Should a new version be published when this PR is merged?

React with an emoji to vote on the release type:

Reaction Type Next Version
👍 Prerelease 2.114.2-alpha.1
🎉 Patch 2.114.2
❤️ Minor 2.115.0
🚀 Major 3.0.0

Current version: 2.114.1

Deployment

  • Deploy to production (triggers ArgoCD sync after Docker image is published)

@github-actions
Copy link
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/mesh/src/tools/projects/get.ts">

<violation number="1" location="apps/mesh/src/tools/projects/get.ts:55">
P2: Non-null assertion on ctx.organization can throw when authenticated context lacks organization scope; requireAuth doesn’t guarantee organization is set.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

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.

2 participants