December 6, 2026

Guess an Agent Number, Steal the Build Secrets: The Spec Sheet on the Exploited TeamCity Flaw, Plus a Patch Checklist

A critical authentication bypass in self-hosted JetBrains TeamCity lets an attacker pose as a trusted build agent, and exploitation attempts began a day after disclosure. Here is the spec sheet and a checklist for teams that run their own build server.

A DevOps engineer types on a laptop at a desk in a software office

If your company writes software, or pays a developer who does, there is a good chance a build server compiles, tests and ships that code automatically. JetBrains TeamCity is one of the most common, and its self-hosted edition has a critical flaw that attackers started probing only a day after it was disclosed. BleepingComputer reported the exploitation, first observed by security firm watchTowr, and SecurityWeek added detail from watchTowr’s honeypot data.

Spec sheet

  • Product: JetBrains TeamCity On-Premises, the self-hosted edition of the build and release automation platform.
  • Identifier: CVE-2026-136858.
  • Severity: critical; SecurityWeek lists a CVSS score of 9.1.
  • Type: authentication bypass. An attacker can impersonate a build agent the server already trusts and receive the jobs meant for it. A build agent is the worker program that runs the tasks the server hands out.
  • Login needed: none. JetBrains says an unauthenticated attacker can exploit it over HTTP or HTTPS.
  • The one hurdle: the attacker has to guess an existing agent’s ID. Those IDs usually start at 1, so watchTowr says guessing is easy.
  • Impact: exposure of credentials and secrets passed to builds, falsified build results, and altered build output that can run attacker code in later builds that use it.
  • Affected: all TeamCity On-Premises versions before 2026.1.7, 2026.2.3 and 2026.3.
  • Fixed in: 2026.1.7, 2026.2.3 and 2026.3. A security patch plugin is available for 2021.2 and later and installs without a server restart. On 2026.2.2 and later, the patch can install itself if automatic security patch installation is turned on.
  • TeamCity Cloud: already fixed; no action needed.
  • Timeline: disclosed by JetBrains on December 2, when it knew of no exploitation. watchTowr saw in-the-wild attempts to take over build agents about a day later.

Context matters here. In September 2026, CISA warned federal agencies that ransomware operators were exploiting a different TeamCity On-Premises flaw, CVE-2026-63077. watchTowr also told SecurityWeek that the attacker hitting its honeypots had earlier exploited a separate high-impact flaw on a Palo Alto Networks device, a sign they go after serious bugs.

Patch and response checklist

  1. Confirm whether you, your developers or an outside software partner run TeamCity On-Premises, and on what version.
  2. Upgrade to 2026.1.7, 2026.2.3 or 2026.3. If you can’t upgrade today, install JetBrains’ security patch plugin.
  3. Patch internet-facing servers first, then servers whose builds handle credentials, as watchTowr recommends.
  4. Restrict access to the /app/agents path and everything under it so only the IP addresses of your real build agents can reach it.
  5. Search teamcity-server.log for entries containing “of the existing agent, but different authorization token”. JetBrains says a non-empty token in those entries may point to a takeover attempt.
  6. For any hit, review the agent’s connection history, source IP address and the builds that ran around that time.
  7. If exploitation looks possible, preserve logs and build results, patch, rotate every credential passed to affected builds, and treat their output files as untrusted until verified.

What this means for your company

A build server is a quiet but powerful system. It holds the keys to source code repositories, cloud accounts and production deployments, and whatever it produces gets shipped to customers. That makes it worth the same care as a domain controller or a firewall. Keep build servers off the open internet where you can, put them on a regular patch schedule, store the secrets they use in a vault with the narrowest permissions possible, and rotate those secrets on a routine basis so a leak has a short shelf life. If an outside developer builds your applications, ask how their build pipeline is secured and whether they were exposed to this flaw.

If you want a second set of eyes on how your development tools and their credentials are protected, we can help. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.

About The Author