In JetBrains TeamCity prior to 2021.1.2, permission checks in the Agent Push functionality were insufficient.
jetbrains teamcity