Summary
A missing authorization check in the migration-planner /api/v1/sources DELETE endpoint allows authenticated users to trigger destructive operations across all tenant data.
When exploited, this flaw can delete sources, agents, and assessments, causing severe loss of availability and integrity for the entire SaaS platform.
Affected context
This vulnerability occurs in the migration-planner SaaS API layer, specifically in the handler backing the DELETE /api/v1/sources route.
It is relevant in multi-tenant or shared environments where authenticated users can interact with shared API endpoints but where per-tenant or per-resource authorization is expected.
The issue manifests when the route processes delete requests without enforcing fine-grained authorization or scoping the operation to the caller's own resources, allowing broad destructive actions against platform-wide data.
Exploit preconditions
- Attack surface: HTTP API endpoint exposed by the migration-planner service (DELETE /api/v1/sources).
- Required access: Any authenticated account capable of sending requests to this endpoint; no elevated roles or administrative privileges are required if the route is unprotected.
- Trigger point: Sending a crafted DELETE request to /api/v1/sources, leveraging the lack of authorization checks and insufficient filtering.
- Why exploitation is possible: The endpoint does not enforce proper authorization logic or tenant scoping, treating any authenticated caller as implicitly trusted for destructive, global data operations.
Why this happens
The underlying issue is missing or incomplete enforcement of authorization controls on a sensitive API endpoint, aligning with CWE-306 (Missing Authentication for Critical Function) and more broadly with broken access control patterns.
The DELETE /api/v1/sources route appears to rely solely on the fact that the request is authenticated, without performing checks to ensure the caller is permitted to execute a global delete operation or to restrict the operation to a specific tenant or resource set.
This design conflates authentication (who you are) with authorization (what you are allowed to do), leaving a critical function exposed to any logged-in user.
Potential impact
- Authenticated users could delete all configured sources across all customers.
- Platform-wide agents and associated configurations may be removed, disrupting ongoing operations.
- Historical assessments and analysis results can be irreversibly deleted.
- Customers may experience extended downtime, data loss, and inability to perform migrations.
- The SaaS provider's integrity and reliability can be significantly undermined.
General mitigation guidance
Effective mitigation focuses on enforcing robust, least-privilege authorization controls around destructive API operations.
Recommended patterns include:
- Implementing explicit authorization checks for all state-changing endpoints, with clear role and permission models.
- Scoping delete operations to specific resources owned by the caller (e.g., tenant-scoped deletes) rather than allowing blanket deletion.
- Applying principle of least privilege so that only dedicated administrative roles can invoke high-impact operations, and only when necessary.
- Introducing server-side filtering and validation of targets to ensure that users cannot act on resources outside their ownership or tenancy.
- Using secure-by-default API designs where bulk or global destructive actions require additional safeguards, such as multi-step confirmations or administrative approval workflows.
How teams detect issues like this
Detection strategies typically focus on both preventative and reactive controls:
- Static analysis and code review: Flag handlers for critical HTTP verbs (e.g., DELETE, PUT, POST) that lack explicit authorization and tenant-scoping logic. Review controllers for endpoints that impact multiple tenants or large data sets.
- Policy enforcement: Enforce coding standards requiring authorization middleware or decorators on all protected routes, and ensure that automated tests verify permissions.
- Runtime monitoring: Log and monitor destructive operations, including who invoked them, target scope, and frequency. Alert on anomalous patterns such as bulk deletions or cross-tenant resource access.
- Automated security testing: Use API security scanners or custom integration tests to probe for unauthorized access to sensitive endpoints, validating that permission checks are consistently applied.

