Skip to content

One day after disclosure, attackers were already exploiting a TeamCity flaw

JetBrains disclosed a critical authentication bypass on December 2. WatchTowr's honeypots recorded exploitation attempts against its network the next day.

Photograph-style image of a factory packing line at night, a row of identical grey crates on a conveyor with one vermillion-red crate at the right, its lid ajar under a warm work lamp
A packing line at night, one crate standing open under a work lamp.

JetBrains disclosed a critical flaw in its TeamCity build server on December 2 and said it knew of no attacks against it. The next day, attackers were already trying to exploit it.

The flaw is tracked as CVE-2026-136858 and carries a CVSS severity score of 9.1 out of 10. It is an authentication bypass in TeamCity On-Premises, the self-hosted edition of JetBrains' build and release automation server, and it affects every version.

An attacker who can reach the server over HTTP or HTTPS needs no account at all. The flaw lets them impersonate a build agent the server already trusts, receive the builds assigned to that agent, read the credentials passed to those builds, and return falsified results or tampered artifacts. Any later build that consumes those artifacts can run the attacker's code.

The guess that opens the door

TeamCity assigns each build agent a number. The flaw sits in agent registration: an attacker who presents a valid agent number can register as that agent, and the server takes their word for it. The real agent is pushed aside, and its jobs go to the impostor instead.

The number is not hard to guess. WatchTowr, the security firm that spotted the attacks, says the IDs typically start at 1 and follow a predictable sequence. Its head of threat intelligence, Jake Knott, told SecurityWeek that exploitation is "rather easy" when agents are numbered in the usual way.

That is what makes the flaw dangerous beyond its score. The attacker does not break into the build system. They become one of its trusted workers, with the server handing them the secrets and output of the builds it runs. A poisoned artifact then travels downstream on its own, into whatever build or deployment consumes it next.

Diagram of the takeover in four steps: an attacker reaches the TeamCity server, guesses a build agent ID, the server trusts the impostor, and secrets leak while artifacts are poisoned for downstream builds.
The attacker needs no account. Guessing a valid agent number is enough to take the agent's place. Source.

A day is all it took

Security researcher Jiawei Guo reported the flaw to JetBrains privately on November 24. JetBrains disclosed it on December 2, with fixed versions 2026.1.7, 2026.2.3, and 2026.3, and said it was not aware of any exploitation in the wild.

WatchTowr observed exploitation attempts the next day, December 3, against its Attacker Eye honeypot network. The firm says the flaw was reverse engineered and exploited against its honeypots around a day after disclosure. Knott told SecurityWeek the same attacker had previously exploited a PHP2Shell flaw against a Palo Alto Networks device in WatchTowr's honeypot network, which suggests a focus on high-impact vulnerabilities.

That speed is no longer unusual. Google's threat researchers documented the same compression in November, when they caught an AI framework turning freshly published patches into working exploits with no human in the loop. TeamCity is the latest case where the gap between disclosure and attack is measured in hours, not weeks.

TeamCity has been a target before. In September, CISA warned federal agencies that ransomware operators were targeting a different TeamCity flaw, CVE-2026-63077, to run arbitrary commands on servers. The build server is where code becomes software, and an attacker who controls it does not need to touch the code at all.

Patch it, then check the logs

JetBrains strongly recommends updating to 2026.1.7, 2026.2.3, or 2026.3. For servers that cannot update yet, the security patch plugin covers this flaw and installs without restarting the server. On 2026.2.2 and later, the plugin can install automatically. TeamCity Cloud customers need to do nothing: JetBrains already applied the fix there.

Then check whether anyone already got in. JetBrains says to search teamcity-server.log for entries reading of the existing agent, but different authorization token followed by a quoted token value. An entry with a non-empty token may indicate a takeover attempt. Empty tokens are expected and can be ignored. If a suspicious entry turns up, compare its timestamp against the agent's connection history and the builds around it, and treat artifacts from those builds as untrusted until verified.

As an extra barrier, JetBrains recommends restricting requests to /app/agents and its subpaths to the IP addresses of legitimate build agents. WatchTowr's advice on order: internet-facing servers first, then any server whose builds handle credentials.

The log check takes minutes, and the plugin installs without a restart. The quiet window for patching closed on December 3.

Related reporting

More from grep.tips

All articles