TeamCity CVE-2024-27198 exploited

Threat actors started targeting a critical TeamCity vulnerability almost immediately after patches were announced and its details were made public due to what appears to be poor communication during the responsible disclosure process.

On March 4, JetBrains announced patches for two authentication bypass vulnerabilities affecting its TeamCity build management and continuous integration server. One of the flaws, tracked as CVE-2024-27198, has been rated ‘critical severity’, while the other, CVE-2024-27199, has been rated ‘high severity’.

The critical flaw allows a remote, unauthenticated attacker to take complete control of a vulnerable TeamCity server by creating a new admin user account or by generating an admin access token.

”Compromising a TeamCity server allows an attacker full control over all TeamCity projects, builds, agents and artifacts, and as such is a suitable vector to position an attacker to perform a supply chain attack,” explained Rapid7, whose researchers discovered the flaws.

The technical details of the vulnerabilities and the availability of patches were announced on the same day due to miscommunication between Rapid7 and JetBrains.

Rapid7 did not want JetBrains to do what it assessed to be silent patching, which the security firm strongly opposes, and published a blog post detailing its findings shortly after JetBrains announced fixes.

JetBrains, on the other hand, said it wanted to ensure customers were given the chance to install patches before details would be made public so it kept Rapid7 in the dark regarding its plans.

Both companies have described their side of the vulnerability disclosure process, which appears to have gone poorly and led to Rapid7 jumping the gun with its disclosure.

The first exploitation attempts targeting CVE-2024-27198 were seen on March 4, the day the TeamCity vulnerabilities were disclosed.

On March 5, the non-profit cybersecurity organization Shadowserver Foundation reported seeing 16 IPs scanning the internet for vulnerable servers. Proof-of-concept (PoC) exploits started emerging the same day.

Threat intelligence firm GreyNoise started tracking exploitation attempts on March 4 and almost immediately saw attacks coming from over a dozen unique IPs.

LeakIX, a project that scans the web for vulnerable and misconfigured systems, reported seeing mass exploitation of CVE-2024-27198 on March 6. On March 5, LeakIX had seen roughly 2,700 unpatched hosts, including many in the United States, Germany and Russia.

By March 6, the project had seen a drop to 1,700 vulnerable TeamCity instances, but in 1,400 cases there were “clear signs of rogue user creation”.

It’s unclear who is behind the attacks and what their goal is, but TeamCity vulnerabilities were exploited in the past by both profit-driven cybercriminals and state-sponsored cyberspies.