JetBrains says a critical flaw in TeamCity On-Premises lets an attacker who can reach the server over HTTP(S) impersonate an existing build agent without a user account.
According to the JetBrains advisory, the flaw is tracked as CVE-2026-136858 and affects all TeamCity On-Premises versions. An attacker could intercept builds assigned to the agent, reach the secrets passed to those builds, and change build results or published artifacts. Downstream builds that consume a tampered artifact could then run attacker-supplied code.
The fix is in TeamCity 2026.1.7, 2026.2.3 and 2026.3. For servers that cannot upgrade yet, JetBrains released a security patch plugin for TeamCity 2021.2 and later that installs without a restart. JetBrains says TeamCity Cloud was already corrected and that it found no evidence of exploitation there. It also says it is not aware of active exploitation of the on-premises flaw at the time of publishing. Researcher Jiawei Guo reported the issue privately on November 24, 2026.
Why it matters
A build agent holds the credentials a pipeline needs to ship software, so a server that can be fooled about which agent is calling is a path to everything the pipeline signs or deploys. In our reading, the exposure is largest where the TeamCity server answers on the open internet, because the advisory describes no precondition beyond network reach.
The same pattern of CI credentials as the prize appears in our opinion on rotating secrets after a poisoned package, and the patch window follows the logic of a seven-day patch clock for internet-facing servers.
What defenders can do
Update to a fixed version or install the patch plugin. JetBrains advises searching teamcity-server.log for entries that mention an existing agent with a different authorization token, where a non-empty token may indicate a takeover attempt. If you find one, review that agent’s connection history, check the source IP against what you expect, and rotate credentials passed to affected builds. JetBrains also suggests limiting requests to the /app/agents path to the addresses your agents use, and running the server and agents on separate hosts.
Source: JetBrains TeamCity Blog