Vulnerabilities

Critical TeamCity flaw lets attackers hijack build agents

JetBrains fixes CVE-2026-136858, a critical TeamCity On-Premises bypass letting unauthenticated attackers impersonate build agents and steal secrets.

Illustration of a server rack representing a JetBrains TeamCity build server with a critical vulnerability warning

JetBrains has fixed a critical authentication bypass in TeamCity On-Premises that lets anyone who can reach the server pose as one of its trusted build agents. No attacks have been reported yet, but past TeamCity flaws have been weaponised quickly, so UK teams running their own CI servers should patch this week, not next quarter.

What happened

On 2 December 2026 JetBrains published an advisory for CVE-2026-136858, a critical vulnerability in TeamCity On-Premises, its self-hosted continuous integration and delivery server. The company scores the flaw 9.1 under CVSS 3.1. The vector is network-reachable, low complexity, needs no privileges and no user interaction, with high impact on confidentiality and integrity.

JetBrains says every on-premises version is affected. Fixed builds are available as 2026.1.7, 2026.2.3 and 2026.3. For organisations that cannot upgrade straight away, there is also a security patch plugin covering 2021.2 and later that can be installed without restarting the server. TeamCity Cloud has already been fixed by the vendor. JetBrains says it found no sign that any cloud tenant was abused, and cloud customers need do nothing.

The bug was reported privately on 24 November by security researcher Jiawei Guo under JetBrains’ coordinated disclosure policy, a turnaround of just over a week. When the advisory went out JetBrains said it knew of no active exploitation. Ostorlab’s analysis on 3 December also found no public proof of concept, and the CVE was not then listed in CISA’s Known Exploited Vulnerabilities (KEV) catalogue.

The technical picture

TeamCity splits the work between a central server and a fleet of build agents, which register with the server, receive jobs and report back. Agents are routinely handed whatever a build needs: repository credentials, cloud deployment keys, package registry tokens, signing material. That makes the agent identity one of the most trusted relationships in a software delivery pipeline.

The NVD record, using JetBrains’ own CNA description, puts the flaw in the agent registration process. It is classified as CWE-639, authorisation bypass through a user-controlled key. In plain terms, an unauthenticated party who can talk to the server over HTTP or HTTPS can register in a way that displaces an existing, already authorised agent and takes over its place. No TeamCity user account is needed.

The consequences JetBrains lists are serious. The impostor can receive the builds meant for the genuine agent and harvest the secrets passed to them. It can also report false build results or publish tampered artefacts. JetBrains spells out the knock-on effect: downstream builds that consume those artefacts could end up running code supplied by the attacker. That is a supply chain compromise, not just a server compromise.

CISA’s SSVC assessment in the NVD entry marks the flaw as automatable with “total” technical impact, although no exploitation had been seen when it was scored. Neither JetBrains nor the CVE record describes the exact request path.

Checklist of five actions for TeamCity On-Premises administrators responding to CVE-2026-136858

Why it matters for UK organisations

TeamCity is a popular self-hosted CI server, and it turns up regularly at UK software houses, financial services teams and public sector suppliers. Some sit on the open internet so that cloud-hosted or remote agents can reach them. Every one of those servers is in scope here, because the only precondition is network access to the server’s web interface.

The UK has been here before. In December 2023 the NCSC co-signed a joint advisory with CISA, the FBI, the NSA and Polish partners. It warned that actors linked to Russia’s foreign intelligence service, the SVR (also tracked as APT29 or Midnight Blizzard), were exploiting a different TeamCity flaw, CVE-2023-42793, against servers worldwide. More recently, according to The Hacker News, CISA flagged another critical TeamCity bug, CVE-2026-63077, as exploited in real attacks. Build servers are attractive to both state actors and criminals because one foothold can reach many customers.

There is a regulatory angle too. A tampered artefact shipped to customers is the kind of incident that would interest the ICO if personal data follows. It would also matter to sector regulators and to customers whose contracts require secure development practices. Managed service providers and software suppliers preparing for the Cyber Security and Resilience Bill should treat their CI estate as part of the critical supply chain.

Expert view

In my experience CI/CD servers are among the most over-privileged and under-monitored systems in a typical estate. When we test, the build server often holds the keys to source control, the artefact store and production deployment, frequently with long-lived credentials nobody has rotated in years. A flaw that lets an outsider quietly stand in for a legitimate agent goes straight to the heart of that trust.

What makes this bug awkward is how quiet it could be. Nobody needs to log in, and no administrator sees a new user. Builds may still go green. If an attacker swaps one artefact or simply copies the secrets passed to a job, the first sign may be weeks later, somewhere downstream. That is why JetBrains’ guidance on checking logs and rotating credentials matters as much as the patch itself.

The positive news is that JetBrains has made patching easy. The hot-installable plugin removes the usual excuse that the build server cannot be taken down mid-sprint. With previous TeamCity flaws exploited soon after disclosure, I would treat the gap between “no known exploitation” and mass scanning as days, not months.

What to do now

  1. Find every TeamCity server. Include forgotten team-owned instances, containers and test servers, and check whether each one is reachable from the internet.
  2. Patch. Upgrade to 2026.1.7, 2026.2.3 or 2026.3. If you cannot, install the CVE-2026-136858 security patch plugin, which supports 2021.2 onwards and needs no restart. On 2026.2.2 and later, consider setting security patches to install automatically. This maps to the Cyber Essentials security update management control.
  3. Restrict the agent endpoint. JetBrains suggests a path-aware rule on your reverse proxy so that /app/agents and its subpaths accept only the source addresses of your real agents, including cloud agent egress and NAT gateways. More broadly, keep the server off the open internet and put remote access behind a VPN (Cyber Essentials firewalls and secure configuration).
  4. Hunt for takeover attempts. Search teamcity-server.log for registration messages where a known agent presents a token that differs from its own and is not blank. JetBrains says empty tokens are expected and can be ignored. Check any hits against the agent’s known hostname and IP address, and against build logs and artefacts from around that time.
  5. If anything looks wrong, assume compromise. Preserve logs and build outputs, rotate every credential passed to affected builds, and treat their artefacts as untrusted until verified. Trace where those artefacts were deployed.
  6. Reduce the blast radius for next time. Run the server and agents on separate hosts, prefer short-lived and narrowly scoped build credentials, and sign and verify artefacts before deployment (Cyber Essentials user access control).

Bottom line

CVE-2026-136858 lets an outsider pose as a trusted TeamCity build agent, read its secrets and feed tampered code into your pipeline, all without credentials. There is no sign of attacks yet, and the fix is straightforward. Given how quickly earlier TeamCity bugs were weaponised, UK organisations running their own TeamCity servers should patch now, lock down the agent endpoint and check their logs.

Sources