RC RANDOM CHAOS

Critical TeamCity flaw lets unauthenticated attackers hijack build agents

JetBrains patched CVE-2026-136858, a critical TeamCity flaw that could let an unauthenticated attacker impersonate a build agent and read its secrets.

· 3 min read
Critical TeamCity flaw lets unauthenticated attackers hijack build agents

JetBrains has patched a flaw in on-premises TeamCity, tracked as CVE-2026-136858, that lets an attacker who can reach the server over HTTP(S) impersonate an authorized build agent. No authentication and no TeamCity user account are required. It carries a CVSS score of 9.1, and every on-premises version is affected.

The target is the trust relationship between the TeamCity server and its build agents. An agent is the worker that actually runs a build: it checks out source, executes the build steps, and receives whatever secrets the server passes down so those steps can authenticate to registries, sign artifacts, or reach deployment targets. The server hands each build to a registered, authorized agent. According to JetBrains, this flaw lets an unauthenticated attacker impersonate an existing authorized build agent, displace the legitimate one, and intercept the builds assigned to it.

Once an attacker is standing in for a real agent, JetBrains says they can intercept builds, read the credentials and other secrets passed to the agent, falsify build results, and publish tampered artifacts. The last point is the one worth sitting with: downstream builds that consume those artifacts could execute attacker-supplied code.

JetBrains says there is no evidence of active exploitation. Security researcher Jiawei Guo reported the flaw on November 24, 2026.

What to do

Update the server to 2026.1.7, 2026.2.3, or 2026.3. If you cannot restart the server right now, JetBrains has published a security patch plugin that works on TeamCity 2021.2 or later and does not require a restart. TeamCity Cloud is not affected and needs no action.

For defence in depth, JetBrains recommends restricting the agent endpoint at your reverse proxy. Allow requests to /app/agents and its subpaths only from the IP addresses where you expect legitimate agents to originate, and remember to include the outbound addresses of any cloud agents and the NAT gateways they connect through. That allowlist is useful beyond this one CVE: the agent-registration surface is exactly the kind of endpoint that has no business being reachable from the general internet.

Why patch speed matters here

This disclosure comes nearly four months after another critical TeamCity vulnerability. The previous one, CVE-2026-63077 at CVSS 9.8, was weaponized in real-world attacks, per CISA. Build servers are a high-value target for the same reason this flaw is dangerous: the secrets passed to an agent and the artifacts it publishes reach downstream builds, which can execute attacker-supplied code if those artifacts are tampered with. A TeamCity bug has already been exploited in the wild this year, so the absence of exploitation today is not a reason to wait.

If you cannot patch or apply the plugin immediately, JetBrains offers the reverse-proxy allowlist as an additional mitigation: the vulnerability requires reaching the server over HTTP(S), so restricting who can reach the agent endpoint narrows the exposure. Restrict /app/agents as a stopgap, but the patched version is the fix JetBrains recommends.

Share

Keep Reading

Latest on the Wire

Full wire →

New signal daily · RSS

Stay in the loop

New writing delivered when it's ready. No schedule, no spam.