How to fix CVE-2024-27198 – Step-by-Step Guide
CVE-2024-27198 is a critical authentication bypass vulnerability affecting JetBrains TeamCity. This flaw allows unauthenticated attackers to gain full administrative control over affected TeamCity servers. Immediate action is required to secure your CI/CD pipelines.
What is JetBrains TeamCity Authentication Bypass?
This vulnerability, specifically in TeamCity's web UI, permits unauthenticated attackers to bypass authentication mechanisms entirely. By exploiting this flaw, an attacker can create new administrator accounts, effectively gaining full control and the ability to execute arbitrary code on the underlying server.
Impact and Risks for your Infrastructure
The impact is severe, leading to complete server takeover. Attackers can access all source code repositories, exfiltrate sensitive secrets stored within TeamCity, and execute arbitrary builds. This compromises the integrity and confidentiality of your entire CI/CD pipeline.
Step-by-Step Mitigation Guide
To mitigate CVE-2024-27198, immediately upgrade your JetBrains TeamCity instance to version 2023.11.4 or higher. Verify the upgrade by checking the TeamCity server version in the administration panel. Ensure no unauthorized admin accounts were created prior to the patch.
- 1Update TeamCity to 2023.11.4 or later immediately.
- 2Restrict TeamCity web UI access to trusted IP ranges only.
- 3Audit TeamCity user accounts and remove any unauthorized admin accounts.
- 4Rotate all credentials, tokens, and VCS passwords stored in TeamCity.
- 5Review build logs for signs of exploitation (unauthorized builds, new admin accounts).
- 6Enable TeamCity audit logs and set up alerts for admin account creation.