Skip to main content
Menu
Advisories

Token operations exposed through the event stream and cancellable by any client

GHSA-3VW7-M6CC-Q5RJPublished Updated GitHub

Description

Reported from github.com/lxc/incus/security/advisories/GHSA-cwg9-8mc4-hf7j

Certificate and cluster join tokens are backed by operations in the default project. Reading those operations requires the permission to create the matching token, but their events, which include the token secret, were sent to any client allowed to view events in the default project.

Cancelling an operation also skipped all authorization when the operation type has no associated permission, which includes token operations.

Details

A restricted client trusted for the default project can subscribe to operation events, capture a certificate token as it's created and use it to enroll a new unrestricted certificate, gaining full access to the server. Cluster join tokens are exposed the same way.

Any authenticated client can also cancel a token operation, or any other operation without a specific permission, provided it knows the operation UUID.

Proof of concept

Only issue restricted certificates for projects other than the default project, as operation events are only delivered to clients allowed to view events in the operation's project.

Impact

The metadata of token operations is now kept out of the event stream. Cancelling an operation requires the same access as viewing it, and operations without a specific permission can only be cancelled by their requestor or by clients able to edit the project.

References

GitHub · canonical/lxd