/

CVE-2026-81035

Severity:

HIGH RISK

(8.1)

Improper Authorization (CWE-862) in Midday Team Deletion

CVE-2026-81035

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Team and Data Destruction

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Midday contains an authorization flaw in its team-deletion workflow that allows any team member, including invited users, to delete the team. Because deletion also removes team-scoped records and triggers cleanup involving stored bank-connection tokens, an otherwise authorized member may cause extensive data loss and potentially affect connected provider operations.

Affected context

The vulnerability occurs in Midday's team-management API when the team-deletion procedure relies on a membership helper that confirms membership but does not distinguish between roles. Deployments are at risk when untrusted or lower-privileged members can invoke this procedure and the data layer repeats the same insufficient check instead of enforcing an owner-level authorization requirement. Related member-management procedures may contain role-aware checks, but those checks are not consistently applied to deletion and update operations.

Exploit preconditions

  • Attack surface: Team-management API procedures in the application backend
  • Required access: Membership in the target team, including an invited-member role
  • Trigger point: Invocation of the team-deletion operation
  • Why exploitation is possible: The authorization helper treats all team-membership records as sufficient permission and does not verify that the caller has an owner-level role
  • Additional condition: The caller must be able to reach the affected procedure through the deployed API and the associated team record must exist

Why this happens

The underlying bug is a missing authorization check, mapped to CWE-862: Missing Authorization. The application verifies that a caller belongs to a team but incorrectly treats membership as equivalent to permission to perform a destructive administrative action. The data layer repeats the same membership-only decision, creating defense-in-depth failure, while role-aware checks used by neighboring procedures are not applied consistently to deletion or update operations.

Potential impact

  • An ordinary member may delete a team without owner approval
  • Team-scoped records and associated application data could be destroyed
  • Cleanup processing may operate on stored bank-connection tokens
  • Connected financial-provider integrations could be disrupted or affected
  • Business operations, auditability, and data availability may be impaired
  • The related update authorization gap could permit unauthorized changes to team data

General mitigation guidance

Mitigation generally focuses on enforcing operation-specific authorization at every layer that performs a security-sensitive action.

Common defensive patterns include:

  • Require an explicit owner or administrator role for team deletion and other destructive operations
  • Centralize policy decisions so membership checks cannot substitute for role checks
  • Re-authorize sensitive actions in the data layer rather than relying solely on router-level checks
  • Apply consistent role-aware authorization to deletion, update, and member-management procedures
  • Prefer deny-by-default behavior for administrative operations
  • Minimize the privileges and lifetime of tokens used by asynchronous cleanup jobs
  • Add transaction safeguards, confirmation controls, and recoverability mechanisms for destructive workflows
  • Record authorization decisions and sensitive team-management events for audit purposes

How teams detect issues like this

Organizations can identify similar authorization weaknesses through:

  • Static analysis that flags destructive procedures guarded only by generic membership predicates
  • Code review checks requiring explicit role or capability validation for administrative operations
  • Comparison of authorization policies across neighboring create, update, delete, and member-management procedures
  • Tests covering every supported role, including invited members and ordinary members
  • Policy enforcement requiring owner-level authorization for team deletion and other irreversible actions
  • Runtime monitoring for deletion requests initiated by non-owner roles and unusual cleanup-job activity
  • Automated application-security review tools that trace authorization decisions from API routes through data-access functions

Sources

SourceLink
github.comgithub.com/midday-ai/midday
github.comgithub.com/midday-ai/midday/blob/e5f45ed0d49cdb34576373623c4579b72daa74c1/apps/api/src/trpc/routers/team.ts
github.comgithub.com/midday-ai/midday/issues/890
vulncheck.comvulncheck.com/advisories/midday-missing-owner-check-on-team-deletion

Frequently asked

questions

A user who is already a member of the affected team may be able to exploit it. The issue is especially relevant to invited or ordinary members because the authorization logic does not adequately distinguish their role from an owner.

No. The described condition requires authenticated team membership and access to the affected team-management procedure. The exact reachability depends on deployment routing and API exposure.

Enforce an explicit owner or administrator authorization policy for team deletion and apply that policy both at the API boundary and in the data layer. Membership alone should not authorize destructive administrative actions.

Define centralized, deny-by-default authorization policies, test each operation against every role, and review destructive workflows for consistent checks across routers, service functions, and background jobs.

Find out what's already
exploitable in your codebase.