Exploitation of build agents
JetBrains released security updates to address CVE-2026-136858, an Authentication Bypass vulnerability that allows attackers to hijack build agents in TeamCity On-Premises. watchTowr observed in-the-wild exploitation attempts just one day after the public disclosure of the flaw. Attackers can impersonate a trusted worker and receive jobs intended for that agent by guessing a build agent ID, which typically starts at "1" and remains relatively easy to predict for hackers. This vulnerability allows an attacker to expose credentials passed to jobs, report false build results, or return modified output files that execute attacker-supplied code when used in later builds. Because build agents act as worker software that run jobs assigned by the TeamCity server, hijacking them gives attackers direct access to the development pipeline. While JetBrains reported no active exploitation of the flaw in its bulletin, watchTowr Intel reports attempted hijacks.
Mitigation and detection
The availability of patches for versions 2026.1.7, 2026.2.3, and 2026.3 makes this risk manageable for most administrators. Administrators can mitigate the risk by restricting /app/agents and its subpaths to the source IPs of legitimate build agents.
| Version | Fix Status |
|---|---|
| 2026.1.7 | Patched |
| 2026.2.3 | Patched |
| 2026.3 | Patched |
| 2026.2.2 and later | Automatic patch installation |
| 2021.2 and later | Security patch plugin available |
| TeamCity Cloud | Already fixed |
To identify a takeover attempt, users should check teamcity-server.log entries for the specific line: of the existing agent, but different authorization token <token>. The presence of a non-empty token may also indicate an attempt to hijack an agent. If users suspect exploitation, JetBrains advises preserving logs and build results, patching the server, rotating credentials passed to affected builds, and treating artifacts as untrusted until verification occurs. Administrators should also check the agent connection history, source IP, and builds around the timestamp to determine if the attempt succeeded. This follows a September 2026 warning from CISA that ransomware operators were targeting another JetBrains TeamCity On-Premises vulnerability, CVE-2026-63077, to execute arbitrary OS commands on targets. For users on 2026.2.2 and later, TeamCity can install the patch unattended if automatic security patch installation is enabled. JetBrains provides a security patch plugin for 2021.2 and later that can be installed without restarting the server.
