Critical JetBrains TeamCity flaw can hijack build agents
A critical TeamCity flaw can let unauthenticated attackers impersonate build agents, exposing secrets and tampering with software artefacts.
Hackers are targeting JetBrains TeamCity On-Premises after the disclosure of a critical vulnerability that can let an unauthenticated attacker impersonate an authorised build agent. The warning matters because build agents routinely handle source code, credentials, test results and release artefacts.
The vulnerability is tracked as CVE-2026-136858. JetBrains says an attacker who can reach a TeamCity server over HTTP or HTTPS can impersonate an existing authorised agent without needing a TeamCity user account. That could allow an attacker to intercept builds, access secrets passed to those jobs, falsify results or tamper with artefacts used by later builds.
TeamCity is JetBrains’ self-hosted platform for software build and release automation. A build agent is the worker that runs jobs assigned by the TeamCity server. The flaw effectively allows an attacker to displace a legitimate worker and receive work intended for it.
The fix
JetBrains has released fixes in TeamCity versions 2026.1.7, 2026.2.3 and 2026.3, and strongly recommends that on-premises customers update. A security patch plugin is also available for TeamCity 2021.2 and later when a full upgrade is not immediately possible. TeamCity Cloud has already received the fix, according to the vendor.
On TeamCity 2026.2.2 and later, administrators can enable automatic security patch installation. JetBrains also recommends restricting `/app/agents` and its subpaths to the expected source IP addresses of legitimate build agents where that is practical.
What administrators should check
JetBrains says administrators should search `teamcity-server.log` for entries containing “of the existing agent, but different authorization token”. A non-empty token can indicate an attempted takeover, while an empty token is expected for this check. Teams that find suspicious entries should preserve logs and build results, patch the server, rotate credentials passed to potentially affected builds and treat related artefacts as untrusted until they have been checked.
BleepingComputer reports that watchTowr observed attempted exploitation one day after the public disclosure. JetBrains’ own bulletin says it was not aware of active exploitation when published, so the two accounts should not be treated as identical claims: observed targeting is a reason to patch quickly, not proof that every affected server has been compromised.
Our opinion
This is the sort of build-system vulnerability that deserves a faster response than its software-development label might suggest. A compromised agent sits close to code, secrets and the artefacts that teams later deploy, so patching TeamCity should be treated as a supply-chain security task rather than a routine maintenance ticket. The practical response is clear: update or apply the plugin, review the logs and rotate exposed credentials if an agent takeover is suspected.