TeamCity Agent Takeover Bug Exploited a Day After the Patch
watchTowr says attackers reverse engineered TeamCity's CVE-2026-136858 and fired it at its honeypots one day after JetBrains disclosed it, guessing build agent IDs. Update to 2026.1.7, 2026.2.3 or 2026.3.
It took about a day. The TeamCity agent-takeover bug JetBrains disclosed on Dec. 2 was reverse engineered and fired at watchTowr’s honeypots on Dec. 3, the company says, as SecurityWeek reports. We covered the patch when JetBrains still knew of no attacks; that’s no longer true.
For defenders
Affected: all TeamCity On-Premises versions before 2026.1.7, 2026.2.3 and 2026.3. TeamCity Cloud is already fixed. CVE-2026-136858, CVSS 9.1 (v3.1, from JetBrains), authentication bypass during agent registration (CWE-639).
Status: exploitation attempts in the wild, per watchTowr, seen against its Attacker Eye honeypot network. Attackers tried to guess the IDs of existing build agents, which the attack needs; if agents are numbered simply (watchTowr gives “1” as an example), that’s easy. watchTowr’s Jake Knott told SecurityWeek the same attacker earlier exploited PHP2Shell on a PAN-OS honeypot. No successful compromise of a real organization has been reported yet. Not in CISA KEV as of this writing; no public exploit in our CVE data.
Fix: upgrade to 2026.1.7, 2026.2.3 or 2026.3, or install JetBrains’ security patch plugin (2021.2 and later, no restart). Restrict /app/agents and its subpaths at your reverse proxy to known agent addresses, including cloud-agent and NAT egress. watchTowr says to patch internet-facing servers first, then servers whose builds handle credentials or publish artifacts other builds consume.
Check for compromise: JetBrains says to search teamcity-server.log for an existing agent presenting a different authorization token. An empty token is normal; a non-empty one may be a takeover attempt. If you find one, compare that agent’s address, hostname and connection history with its builds and published artifacts, rotate secrets those builds used, and treat their artifacts as untrusted. The Hunt Leads below turn this into sweeps.
What it means for you
TeamCity is the robot many software companies use to build their apps. Hijack it and you can steal the passwords it uses or slip bad code into software customers install. You don’t need to do anything as a consumer. If your business runs its own TeamCity server, it’s now under active attack, so updating can’t wait.
Do this now
- Update self-hosted TeamCity to 2026.1.7, 2026.2.3 or 2026.3 today, or install the security patch plugin.
- Allow
/app/agentsonly from your build agents’ addresses at the reverse proxy. - Search
teamcity-server.logfor agents presenting a different, non-empty authorization token. - If anything looks off, rotate build secrets and rebuild recent artifacts from a clean agent.
Source article: JetBrains TeamCity Vulnerability Exploited One Day After Disclosure
Publisher: SecurityWeek
Published: Dec. 4, 2026
URL: https://www.securityweek.com/jetbrains-teamcity-vulnerability-exploited-one-day-after-disclosure/
Executive Summary
CVE-2026-136858 is an authentication bypass in JetBrains TeamCity On-Premises agent registration (CVSS 9.1) that lets an unauthenticated attacker with HTTP(S) access pose as an existing authorized build agent, displace it, read the credentials and secrets passed to its builds, falsify build results and publish tampered artifacts that downstream builds may execute. JetBrains disclosed and patched it on December 2, 2026 (fixed in 2026.1.7, 2026.2.3 and 2026.3, with a patch plugin for 2021.2 and later) while reporting no known exploitation. On December 3, watchTowr observed the flaw reverse engineered, reproduced and exploited against its Attacker Eye honeypot network; the attempts tried to guess the numeric IDs of established build agents, a prerequisite for the attack that is trivial where agents are numbered sequentially. watchTowr says the same unnamed attacker previously exploited PHP2Shell against a PAN-OS honeypot, which suggests an operator who moves quickly onto high-impact edge and server bugs. No victim organization or attacker infrastructure has been published. The objective of a successful takeover would be credential theft from CI pipelines and software supply-chain tampering. Hunt leads, false positive expectations and implementation guidance are detailed below; no detection rules or indicators were published by the sources.
ATT&CK chain: Initial Access → Credential Access → Impact (supply chain)
Hunt Lead Grid
| Hunt Lead Level | Hunt Lead Name | ATT&CK | Risk of False Positives |
|---|---|---|---|
| 1 (Junior) | TeamCity Server Log Agent Token Mismatch | T1190 (Exploit Public-Facing Application) | Low. JetBrains says an empty token in these entries is expected, so anchoring on a non-empty token removes the routine reconnect noise; a reinstalled agent can still produce a hit and must be checked against change records. |
| 2 (Pro) | Agent Registration Requests From Non-Agent Sources | T1190 (Exploit Public-Facing Application) | Medium. New cloud agents, autoscaling groups and changed NAT egress also hit /app/agents from new addresses; anchoring on an allowlist of agent egress ranges and on bursts of differing agent IDs from one source keeps it manageable. |
| 3 (Elite) | Agent Identity Change Followed by Secret-Bearing Builds | T1195.002 (Supply Chain Compromise: Compromise Software Supply Chain) | Medium. Agents legitimately move hosts during maintenance or rebuilds; the correlation anchors on an address or hostname change that is not in change records and that is followed by builds carrying secrets or publishing artifacts. |
TeamCity Server Log Agent Token Mismatch
The attack works by registering as an agent that already exists, identified by its agent ID, and taking its place. JetBrains’ compromise check is a direct artifact of that step: teamcity-server.log records when a connecting agent claims to be an existing agent but presents a different authorization token. An empty token in that entry is expected behavior, while a non-empty token may indicate a takeover attempt. The hunt is a search of teamcity-server.log (and its rotated copies) for those entries with a non-empty token, then for each hit, pulling the timestamp, the agent ID and name, and the source IP address and hostname that connected, and comparing them with that agent’s normal address and host.
Sweep every TeamCity On-Premises server, including staging and disaster-recovery instances, back to at least December 2, 2026, the disclosure date, and further if your logs go back, since the bug existed in all versions before the fix. Preserve the logs before upgrading, as watchTowr advises, so the evidence isn’t rotated away during the change. Rule out reinstalled or re-imaged agents by checking change records rather than by suppressing the agent name. Blocking the source IP of a hit is not sufficient on its own, because a successful takeover means secrets may already be gone. Any confirmed mismatch from an unexpected address should go straight to incident response: disable the agent, rotate every secret its builds received since the event and treat its artifacts as untrusted until rebuilt.
Hunt Lead Level: 1 (Junior Analyst)
ATT&CK: Initial Access → T1190 (Exploit Public-Facing Application)
Sources: “CVE-2026-136858: Exploited Auth Bypass in JetBrains TeamCity”, watchTowr, Dec. 4, 2026, https://watchtowr.com/intelligence/jetbrains-teamcity-authentication-bypass-cve-2026-136858/ (additional source, same vulnerability); “JetBrains TeamCity Vulnerability Exploited One Day After Disclosure”, SecurityWeek, Dec. 4, 2026 (source article)
Agent Registration Requests From Non-Agent Sources
Exploitation needs network access to the agent endpoints under /app/agents and a valid agent ID; in watchTowr’s honeypots the attackers tried to guess the IDs of established agents, and low or sequential IDs such as “1” make that easy. Real build agents talk to these paths from a small, known set of addresses. The detection is any request to /app/agents or its subpaths from a source address outside your agent egress allowlist, and with higher confidence, a single source cycling through several different agent IDs in a short window, which is the guessing pattern itself.
Use reverse proxy, load balancer or WAF access logs in front of TeamCity, since the server log alone may not show every probe; include URL path and query, source IP and response code. Build the allowlist from on-premises agent hosts, cloud-agent egress and NAT gateways, and refresh it when autoscaling groups change. Start with a one-hour window and alert on three or more distinct agent IDs from one source. JetBrains and watchTowr both recommend enforcing the same allowlist at the proxy, which turns this hunt into a block plus an alert; that is the right control, whereas blocking TeamCity entirely from the internet without first moving agents and staff to a VPN will break builds. Internet-facing servers should expect background scanning, so treat a probe as a reason to verify patch status and run the token-mismatch lead, and escalate if a probe precedes a non-empty token entry.
Hunt Lead Level: 2 (Pro)
ATT&CK: Initial Access → T1190 (Exploit Public-Facing Application)
Sources: “JetBrains TeamCity Vulnerability Exploited One Day After Disclosure”, SecurityWeek, Dec. 4, 2026 (source article); “CVE-2026-136858: Exploited Auth Bypass in JetBrains TeamCity”, watchTowr, Dec. 4, 2026, https://watchtowr.com/intelligence/jetbrains-teamcity-authentication-bypass-cve-2026-136858/ (additional source, same vulnerability)
Agent Identity Change Followed by Secret-Bearing Builds
Once an attacker holds an agent’s identity, the server routes that agent’s builds to the attacker’s machine. JetBrains says the attacker can then read the credentials and secrets passed to those builds, fake build results and publish modified artifacts that later builds consume and execute. The correlation is per agent: an agent whose source IP address or hostname changes (or that disconnects and immediately reconnects from elsewhere) with no matching change record, followed within hours by builds on that agent that receive secret parameters, publish artifacts, or finish unusually fast with a success status, followed by downstream builds that pull those artifacts.
Join TeamCity’s agent connection history and server log with build history (agent, parameters marked as secure, artifacts published, duration) and, where available, network logs for the build server. Baseline each agent’s normal addresses and build durations over 30 days. Scope first to agents that run release, signing or deployment configurations, since those carry the most valuable secrets and the widest downstream reach. Hash-checking artifacts after the fact is not enough unless you have a trusted reference build to compare against; reproducible builds or rebuilding on a known-clean agent is the reliable check. A correlated hit is a potential supply-chain incident: freeze releases from the affected configurations, rotate all secrets the agent received, rebuild and compare artifacts, and notify consumers of anything already shipped. The lead generalizes to any CI system where an agent or runner identity can be hijacked.
Hunt Lead Level: 3 (Elite)
ATT&CK: Credential Access → T1552 (Unsecured Credentials); Initial Access → T1195.002 (Supply Chain Compromise: Compromise Software Supply Chain) (mapped from JetBrains’ description of impact; watchTowr has reported attempts, not completed takeovers)
Sources: “JetBrains TeamCity Vulnerability Exploited One Day After Disclosure”, SecurityWeek, Dec. 4, 2026 (source article); “CVE-2026-136858: Exploited Auth Bypass in JetBrains TeamCity”, watchTowr, Dec. 4, 2026, https://watchtowr.com/intelligence/jetbrains-teamcity-authentication-bypass-cve-2026-136858/ (additional source, same vulnerability)
Hash Appendix
No file hashes were published by the source article or watchTowr for this activity.
References Appendix
- “JetBrains TeamCity Vulnerability Exploited One Day After Disclosure”, SecurityWeek, Dec. 4, 2026, https://www.securityweek.com/jetbrains-teamcity-vulnerability-exploited-one-day-after-disclosure/
- “CVE-2026-136858: Exploited Auth Bypass in JetBrains TeamCity”, watchTowr, Dec. 4, 2026, https://watchtowr.com/intelligence/jetbrains-teamcity-authentication-bypass-cve-2026-136858/
CVE at a glance
- CVSS
- 9.1 Critical (v3.1)
- EPSS
- 1.4% chance of exploitation in the next 30 days (higher than 72.5% of CVEs)
- Exploited in the wild
- Not on CISA’s KEV list
- Public exploit
- None reported in public exploit databases
Data from NVD, FIRST EPSS and CISA KEV, refreshed automatically. We report whether public exploit code exists but never link to it: fake proof-of-concepts that infect researchers are common.