Fedora Account System
Red Hat Associate
Red Hat Customer
A flaw was found in Quay. The list_entity_robots function in data/model/user.py constructs a SQL LIKE pattern from a user-controlled namespace name without escaping wildcard metacharacters. Namespace names may contain underscore (), which SQL LIKE treats as a single-character wildcard. A user who owns a namespace with _ in the right position (e.g. ab_c) can list robots belonging to other tenants whose namespace names match the wildcard pattern (e.g. abxc, ab-c), including their decrypted authentication tokens. This allows an attacker to read another tenant's robot tokens and use them to push and pull container images as those robots, take over a victim's robots by renaming the attacker's namespace, or delete a victim's robots by deleting the attacker's namespace. The codebase contains a proper wildcard escaping function (prefix_search in data/text.py) that is not used in the affected code path.