Industry News

TeamCity CVE-2026-136858: Attackers Hijack Build Agents With No Password — Exploitation Started One Day After the Patch

10 min read

TeamCity CVE-2026-136858: Attackers Hijack Build Agents With No Password — Exploitation Started One Day After the Patch

The Short Answer

If you run a self-hosted TeamCity server that anyone can reach over HTTP(S), patch it today — attackers were already probing for this flaw one day after JetBrains published the fix. On December 2, 2026, JetBrains disclosed CVE-2026-136858, a critical authentication bypass in TeamCity On-Premises with a CVSS score of 9.1. The flaw lets an unauthenticated attacker — no TeamCity account, no password — impersonate an existing authorized build agent, intercept the builds assigned to it, read the secrets those builds carry, and tamper with build results and artifacts. Every TeamCity On-Premises version is affected. The fix is in versions 2026.1.7, 2026.2.3, and 2026.3, and a security patch plugin covers servers on 2021.2 and later that cannot upgrade yet. TeamCity Cloud was patched by JetBrains and needs no action.

The timeline is the story. Security researcher Jiawei Guo reported the flaw privately on November 24, 2026. JetBrains shipped fixes and published the advisory on December 2, stating it was not aware of active exploitation. On December 3 — roughly a day later — watchTowr’s Attacker Eye honeypot network captured attackers reverse-engineering the patch and attempting exploitation. The only prerequisite is guessing the ID number of an active build agent, and as watchTowr points out, agent IDs start at 1 and count upward. For server owners, this is the same lesson as our recent coverage of the Docker Sandboxes flaw that exposed AI API keys: the credentials your automation holds are the real target, and the patch window is now measured in hours, not weeks.

What JetBrains Disclosed on December 2

JetBrains’ advisory, checked on the company’s own blog today, December 6, 2026, is unusually direct. A critical vulnerability in TeamCity On-Premises, tracked as CVE-2026-136858, allows an unauthenticated attacker who can reach the server over HTTP(S) to impersonate an existing authorized build agent. The attacker does not need a TeamCity user account. A successful exploitation can displace a legitimate build agent and intercept builds assigned to it, exposing credentials and other secrets passed to the agent. The attacker can also falsify build results or publish tampered artifacts — and JetBrains explicitly warns that downstream builds consuming those artifacts could execute attacker-supplied code.

Three scope points matter for anyone deciding how urgently to act:

  • All On-Premises versions are affected. There is no safe old version to hide on; JetBrains says the vulnerability affects all TeamCity On-Premises versions, with fixes in 2026.1.7, 2026.2.3, and 2026.3.
  • TeamCity Cloud is already handled. JetBrains applied corrective measures to TeamCity Cloud and found no evidence any Cloud environment was exploited through this flaw. Cloud customers need to do nothing.
  • The server itself is not directly compromised — the build pipeline is. The result is agent impersonation, not code execution on the TeamCity server. That sounds narrower than it is: build agents are where source code, signing keys, cloud credentials, and deployment tokens meet, so impersonating one is a supply-chain attack, not a nuisance.

The CVE record classifies the weakness as CWE-639, authorization bypass through a user-controlled key, in the build-agent registration process: the server did not adequately bind a claimed agent identity to the authorization token stored for that agent before accepting the registration. JetBrains has not published the exact internal code path, and the detection guidance in the advisory (below) is built around exactly that token mismatch.

Exploitation Started the Next Day

At publication on December 2, JetBrains said it was not aware of any active exploitation. That changed within about 24 hours. watchTowr reported on December 3 that its Attacker Eye honeypot network was already observing attempted exploitation of CVE-2026-136858, with attackers reverse-engineering the patch, reproducing the flaw, and trying it against honeypots. The observed attempts focused on guessing the ID numbers of established, long-running build agents — the one real prerequisite, and a weak one, since IDs start at 1.

watchTowr’s head of threat intelligence, Jake Knott, told reporters that successful exploitation lets an attacker impersonate and take control of a build agent in as little as two HTTP requests, intercepting its builds and secrets. The same actor was previously linked to successful exploitation of the PHP2Shell vulnerability against a Palo Alto PAN-OS device in watchTowr’s honeypot network, which suggests a threat actor systematically hunting high-impact, internet-facing flaws rather than a casual scanner.

Two honesty checks on the exploitation picture. First, attempts are not confirmed compromises: as of December 4, no successful attacks or victims had been publicly reported, and the CVE was not yet in CISA’s Known Exploited Vulnerabilities catalog. Second, the absence of confirmed victims is weak comfort — the attack is automatable, needs no credentials, and targets exactly the kind of server (a CI server, often reachable from the internet so remote agents and developers can connect) that tends to sit unpatched behind a “we’ll upgrade next sprint” note. This is the second TeamCity authentication bypass to draw this kind of attention in recent memory: CVE-2024-27198 has been in CISA’s KEV catalog since March 7, 2024, and another critical TeamCity flaw, CVE-2026-63077 (CVSS 9.8), was weaponized in real-world attacks roughly four months ago. TeamCity servers are a known target class, and attackers know it.

The Fix: Upgrade, or the No-Restart Patch Plugin

JetBrains gives two mitigation paths, and recommends the first:

Your situation What to do Notes
TeamCity On-Premises 2026.1.x Update to 2026.1.7 Includes the CVE-2026-136858 fix
TeamCity On-Premises 2026.2.x Update to 2026.2.3 Includes the fix; 2026.2.2+ can auto-install security patches
TeamCity On-Premises 2026.3 line Update to 2026.3 Includes the fix
On 2021.2 or later, cannot upgrade now Install the security patch plugin No server restart required; fixes only CVE-2026-136858
Older than 2021.2 Upgrade to a fixed release The patch plugin does not cover you
TeamCity Cloud Nothing Patched by JetBrains; no evidence of Cloud exploitation

The patch plugin is the pragmatic option for servers that cannot take an upgrade window immediately: it installs without restarting the TeamCity server and addresses this specific vulnerability. But JetBrains is explicit that the plugin fixes only CVE-2026-136858, and recommends updating to a current release to benefit from other security fixes. Treat the plugin as a bridge, not a destination.

There is also an automation detail worth checking before you assume you are covered. Starting with TeamCity 2024.03, the server can automatically download available security patches and notify administrators. On 2026.2.2 and later, if Install automatically is selected under Security patches, the server should check for and install this patch on its own. If your setting is Download and notify, the patch may be sitting downloaded but unapplied; if it is Ignore, nothing happens until an administrator acts. JetBrains recommends enabling automatic installation so future security patches land as soon as they are available. Verify under Administration → Updates rather than assuming.

How to Check Whether Someone Tried It on Your Server

JetBrains published one specific indicator, and it is cheap to check. Search teamcity-server.log for entries containing:

of the existing agent, but different authorization token "<token>"

A non-empty token in that line may indicate an attempt to take over an existing build agent. Entries with an empty token ("") are expected and can be disregarded for this check. If you find a non-empty-token entry, use its timestamp to review the affected agent’s connection history and any builds assigned to it around that time, and verify the hostname and source IP match what you expect for that agent. Compare against build logs, build results, and published artifacts to judge whether the attempt succeeded.

If you suspect exploitation, JetBrains’ guidance is the standard incident-response sequence, applied to a build pipeline: preserve relevant logs and build results, update or patch the server, and rotate any credentials passed to potentially affected builds. Treat artifacts from those builds as untrusted until verified, and trace where they were used or deployed. That last step is the expensive one — a tampered artifact that shipped downstream is a supply-chain incident, not a server incident — which is precisely why patching before an attempt succeeds is worth more than any amount of after-the-fact forensics. The same defense-in-depth thinking applies to the host itself: if your TeamCity server lives on a VPS, the baseline hardening in our guide to securing your VPS (key-only SSH, firewall rules, unattended security updates) is the layer that keeps a single application flaw from becoming a full server takeover.

Reduce the Blast Radius While You Patch

Patching closes the hole; network controls decide how much the next hole can reach. JetBrains’ additional mitigation is specific: configure your reverse proxy or another path-aware access control to allow requests to /app/agents and its subpaths only from IP addresses where legitimate build agents originate, including the outbound addresses of cloud agents and any NAT gateways they connect through. The broader best practices in the advisory are equally plain: limit access to the TeamCity server to trusted networks wherever possible, put outside connections behind a VPN or other network access controls, keep TeamCity up to date, and run the server and build agents on separate hosts.

For the many small teams running TeamCity on a single VPS, that last point deserves emphasis. A combined server-plus-agent box means an agent impersonation lands on the same host as the server’s database and configuration. Separating agents onto their own hosts — or at minimum restricting /app/agents to known agent IPs at the reverse proxy — turns a two-request impersonation into a much harder problem for an attacker who does not know your agent network. And keep the wider patch cadence in view: this flaw arrived the same week as the Linux kernel IPv6 firewall bypass we covered on December 6 — server security in December 2026 is a weekly discipline, not an annual event.

Frequently Asked Questions

Does CVE-2026-136858 affect TeamCity Cloud?
No action is needed. JetBrains applied corrective measures to TeamCity Cloud and found no evidence any Cloud environment was exploited through this vulnerability.

I am on an old On-Premises version. Am I affected?
Yes — JetBrains says all TeamCity On-Premises versions are affected. If you run 2021.2 or later and cannot upgrade immediately, install the security patch plugin (no restart required). Older than 2021.2, upgrade to 2026.1.7, 2026.2.3, or 2026.3.

Does the attacker need a TeamCity account?
No. The vulnerability is exploitable by an unauthenticated attacker who can reach the server over HTTP(S). The one prerequisite observed in the wild is guessing an active build agent’s ID number, which typically starts at 1.

Has anyone actually been compromised?
As of December 4, 2026, exploitation attempts were observed against watchTowr’s honeypot network starting December 3, but no successful attacks or victims had been publicly reported, and the CVE was not in CISA’s KEV catalog. JetBrains said on December 2 it was not aware of active exploitation.

How do I know if my server was targeted?
Search teamcity-server.log for of the existing agent, but different authorization token followed by a non-empty token. That may indicate a takeover attempt; an empty token is expected and can be ignored. If you find a non-empty entry, review the agent’s connection history and builds around that timestamp, and rotate credentials passed to affected builds.

The Bottom Line

CVE-2026-136858 is a patch-now flaw: CVSS 9.1, no authentication required, every On-Premises version affected, and exploitation attempts observed one day after disclosure. Update to 2026.1.7, 2026.2.3, or 2026.3; if you cannot upgrade today, install the no-restart patch plugin on 2021.2+ and schedule the upgrade. Then do the two things that cost almost nothing: grep teamcity-server.log for the token-mismatch line, and restrict /app/agents at your reverse proxy to the IPs your real agents connect from. The attackers probing this flaw are not guessing passwords — they are guessing agent IDs that start at 1. The only reliable defense is a patched server, and JetBrains has already shipped it.

Sources: JetBrains, “Critical Security Issue Affecting TeamCity On-Premises (CVE-2026-136858),” December 2, 2026 — https://blog.jetbrains.com/teamcity/2026/12/cve-2026-136858/ · SecurityWeek, “JetBrains TeamCity Vulnerability Exploited One Day After Disclosure,” December 4, 2026 — https://www.securityweek.com/jetbrains-teamcity-vulnerability-exploited-one-day-after-disclosure/ · The Hacker News, December 3, 2026 — http://thehackernews.com/2026/12/critical-jetbrains-teamcity-flaw-lets.html · Ostorlab analysis, December 2026 — https://blog.ostorlab.co/teamcity-build-agent-auth-bypass-cve-2026-136858.html

Leave a Reply

Your email address will not be published. Required fields are marked *