Summary
Incus can expose migration websocket secrets in operation metadata visible to clients with project event-view access. During an in-flight migration, a client who obtains those secrets may connect to the migration websockets before the legitimate peer and access transferred instance data.
Affected context
The issue occurs in Incus migration workflows when websocket secrets are included in operation metadata accessible to clients with project event-view permissions. Risk arises while a migration is in flight and its control or filesystem websocket endpoints are available.
Exploit preconditions
- Attack surface: Incus project event and migration websocket interfaces
- Required access: Permission to view project events and obtain the exposed operation metadata
- Trigger point: An active migration with control or filesystem websockets available
- Why exploitation is possible: The metadata contains secrets that can allow a client to connect before the legitimate migration peer
Why this happens
Migration websocket secrets are disclosed through operation metadata to clients whose event-view access does not necessarily require access to the migration itself. Exposing sensitive information beyond the intended trust boundary maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Potential impact
- An attacker could hijack an in-flight migration connection.
- Instance configuration or filesystem data may be exposed.
- Migration integrity could be affected if an unauthorized peer interferes with the transfer.
General mitigation guidance
Defensive patterns include keeping authentication secrets out of broadly visible operation metadata and limiting sensitive event details to explicitly authorized audiences. Use short-lived, narrowly scoped credentials for migration connections, validate peer identity independently, and apply least-privilege access to event-view permissions. Review whether migration endpoints and metadata need to be exposed to each client role.
How teams detect issues like this
- Review event and operation metadata for migration credentials or other sensitive values.
- Use static analysis and code review to identify secrets placed in logs, events, or API responses.
- Audit project event-view permissions and monitor for unexpected connections to migration websockets.
- Apply policy checks that prevent sensitive fields from being serialized into broadly accessible metadata.

