Summary
An improper access control issue in migration-planner's /api/v1/sources/{id}/image-url endpoint allows authenticated users to bypass ownership checks by manipulating the source ID.
Under these conditions, an attacker can obtain presigned S3 URLs for other tenants' OVA images, exposing sensitive configuration data and long-lived JWTs that may enable further unauthorized access and modification of victims' sources.
Affected context
The vulnerability occurs in deployments of migration-planner that expose the /api/v1/sources/{id}/image-url API to authenticated users.
It is relevant where:
- Multiple users or tenants manage OVA-based "sources" through the application
- The endpoint relies on a user-supplied
idpath parameter without sufficiently enforcing ownership or tenancy boundaries - OVA images stored in S3 contain sensitive artifacts such as long-lived agent JWTs and source configuration data
When these conditions coincide, one tenant can request image URLs for resources that belong to another tenant.
Exploit preconditions
- Attack surface: Application's HTTP API, specifically
GET /api/v1/sources/{id}/image-url(or equivalent verb). - Required access: Valid authenticated account on the migration-planner instance; no special privileges beyond basic access to the endpoint.
- Trigger point: Supplying an
idvalue that refers to a source owned by another user or tenant. - Why exploitation is possible: The server authorizes access based on authentication alone and does not robustly verify that the requesting principal owns or is permitted to access the
sources/{id}resource, leading to an Insecure Direct Object Reference (CWE-639).
Why this happens
This is an authorization logic flaw where direct object references are exposed via predictable or discoverable identifiers without proper ownership checks.
The backend handler for /api/v1/sources/{id}/image-url accepts an id parameter and proceeds to generate a presigned S3 URL for the corresponding OVA image.
Instead of scoping the lookup to the current user or tenant and enforcing a strict resource-ownership relationship, the code implicitly trusts that any authenticated caller is allowed to access any valid id.
This pattern matches CWE-639: Authorization Bypass Through User-Controlled Key, a common form of IDOR where the application fails to couple object access to a robust authorization decision.
Potential impact
- Exposure of OVA images belonging to other users or tenants
- Disclosure of long-lived agent JWTs embedded within downloaded OVA images
- Unauthorized access to, and potential control over, victims' "source" environments configured in migration-planner
- Use of stolen tokens to impersonate agents or services and escalate privileges in connected systems
- Lateral movement across tenant boundaries and compromise of migration workflows or associated infrastructure
General mitigation guidance
Effective mitigation focuses on tightening authorization checks around direct object references and reducing the sensitivity of stored artifacts:
- Enforce per-user or per-tenant ownership checks whenever accessing
/sources/{id}resources, ensuring queries always scope by both principal and object identifier. - Centralize authorization logic so that resource access decisions are made through a consistent policy mechanism rather than ad-hoc checks spread across handlers.
- Avoid embedding long-lived secrets such as agent JWTs directly within OVA images; prefer short-lived tokens or bootstrapping mechanisms that can be rotated and revoked.
- Design presigned URL generation so that it only occurs after a robust authorization decision and ensures minimal lifetime and scope for the generated URL.
- Apply the principle of least privilege to backend services and data stores so that compromise of one component does not trivially grant access to all tenant resources.
How teams detect issues like this
Detection typically combines code-level analysis with behavioral monitoring:
- Use static analysis and code review to flag patterns where user-controlled identifiers (path parameters, query parameters, or body fields) are used to look up resources without scoping by the authenticated principal.
- In reviews, look for endpoints that generate presigned URLs or access sensitive storage objects and verify that they call a centralized authorization layer that checks ownership or tenant membership.
- Configure application logging to record access to
/api/v1/sources/{id}/image-url, including requester identity andidvalues, and monitor for unusual patterns such as sequential or cross-tenant ID access. - Employ automated security testing (e.g., DAST or API fuzzers) that attempts ID enumeration and IDOR exploitation across all object-based endpoints.

