Skip to content

fix authz-vuln-04#2472

Open
0xcucumbersalad wants to merge 5 commits intodecocms:mainfrom
0xcucumbersalad:fix-authz-vuln-4
Open

fix authz-vuln-04#2472
0xcucumbersalad wants to merge 5 commits intodecocms:mainfrom
0xcucumbersalad:fix-authz-vuln-4

Conversation

@0xcucumbersalad
Copy link
Contributor

@0xcucumbersalad 0xcucumbersalad commented Feb 20, 2026

Fix: Authorization Vulnerability in OAuth Proxy Endpoint

What is this contribution about?

Endpoint: ALL /oauth-proxy/:connectionId/*

This PR fixes a critical authorization vulnerability where unauthenticated attackers could hijack OAuth authorization flows for any connection across organizations.

The issue allowed malicious actors to initiate or manipulate OAuth flows without proper authentication or ownership validation of the connectionId.

This update ensures:

  • Proper authentication is enforced
  • Authorization checks validate ownership of the connection
  • Cross-organization OAuth hijacking is no longer possible

Summary by cubic

Enforce authentication and organization ownership checks on all /oauth-proxy/:connectionId/* endpoints to block cross‑org OAuth hijacking. Adds E2E coverage for 401, 403, and 404 behaviors across authorize, token, and register flows.

  • Bug Fixes
    • Return 401 for unauthenticated requests (no user session or API key) before connection lookup in apps/mesh/src/api/app.ts.
    • Return 404 for non-existent connections.
    • Return 403 when the connection’s organization_id differs from the current organization across authorize, token, and register endpoints.

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

@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.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 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.113.2-alpha.1
🎉 Patch 2.113.2
❤️ Minor 2.114.0
🚀 Major 3.0.0

Current version: 2.113.1

Deployment

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

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

@viktormarinho
Copy link
Contributor

@0xcucumbersalad plz fix checks and also check if this also handles IDOR for users that are logged in but hijacking another org's mcps?

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