Skip to content
Start with Identity

TeamCity flaw let unauthenticated attackers impersonate build agents and take their secrets

JetBrains fixed CVE-2026-136858 (CVSS 9.1), an authentication bypass in TeamCity On-Premises agent registration that lets anyone who can reach the server impersonate an authorized build agent, intercept builds and their secrets, and tamper with artifacts. Fixed in 2026.1.7, 2026.2.3 and 2026.3.

By SWI Community TeamDec 2, 2026

JetBrains disclosed CVE-2026-136858 on December 2, a critical flaw affecting all TeamCity On-Premises versions (JetBrains). NVD describes it as an "authentication bypass during agent registration" that allowed takeover of authorized build agents, rated CVSS 9.1 (CWE-639). An unauthenticated attacker who can reach the server over HTTP(S) can impersonate an existing agent without a TeamCity account, receive the builds assigned to it, read the credentials passed to those builds, and publish falsified results or tampered artifacts. Fixed releases are 2026.1.7, 2026.2.3 and 2026.3, and a security patch plugin covers 2021.2 and later without a restart. TeamCity Cloud was already patched. JetBrains knew of no exploitation at publication, but The Hacker News reports watchTowr has since seen attempts that guess sequential agent IDs.

Why it matters

A build agent is a non-human identity that the CI server trusts with deploy keys, cloud credentials and signing material. Here the server accepted a new registration for an existing agent without proving the caller held that agent's credential, so whoever registered became the agent.

Patch or install the plugin, then follow JetBrains' log check: an "existing agent, but different authorization token" entry with a non-empty token signals an attempt. Where you find one, rotate every secret passed to that agent's builds and treat its artifacts as untrusted. Restrict /app/agents at the reverse proxy to agent source IPs, and prefer short-lived workload identity tokens over long-lived secrets in build parameters. See secrets in repositories and CI and the CVE-2026-136858 brief.

Source: JetBrains, NVD, The Hacker News

Security records in this story

The vulnerabilities, incidents, attack techniques and threat groups this post covers, each with its own sourced reference page.

Last reviewed By SWI Community TeamSuggest a correctionHow we research
Independent analysis. No vendor sponsorship. Editorial policy · Report a correction