Published: 2026-12-03
Categories: Software Supply Chain Security
Impersonating the Build Agent: TeamCity CVE-2026-136858 and CI Trust Boundaries
Key Takeaways
On December 2, 2026, JetBrains disclosed CVE-2026-136858, a critical (CVSS v3.1 9.1) authentication bypass in TeamCity On-Premises that allows an unauthenticated attacker who can reach the server over HTTP(S), and who knows or can guess a valid agent identifier, to impersonate an existing, authorized build agent [1][2][3]. By displacing a legitimate agent, an attacker can intercept the builds routed to it, obtain the credentials and other secrets the server passes to that agent, and tamper with build results and artifacts that downstream consumers may later execute [1][2]. All TeamCity On-Premises versions are affected except 2026.3, 2026.2.3 and later 2026.2.x releases, and 2026.1.7 and later 2026.1.x releases; every 2025.11 and earlier release is vulnerable, while TeamCity Cloud is not affected [1][2][3].
The first priority is to patch, either by upgrading to 2026.1.7, 2026.2.3, or 2026.3 or by installing JetBrains’ standalone security patch plugin, which supports TeamCity 2021.2 and later [1][3]. Until that is done, operators should restrict /app/agents and its subpaths at the reverse proxy so that only addresses where legitimate agents, cloud agents, and their NAT gateways originate can reach it [1][2]. Defenders should also search teamcity-server.log for registrations of an existing agent presenting a different, non-empty authorization token [1][3]. Where impersonation cannot be ruled out, exposure should be treated as a secrets incident: rotate every credential delivered to builds on any agent whose identity may have been impersonated, or on all of the server’s agents if logs do not cover the full exposure window, and treat the resulting artifacts as unverified [3]. Finally, organizations should prepare for rapid weaponization. No exploitation or public proof of concept was reported as of December 3, 2026 [2][3], but three of the most recent critical, unauthenticated TeamCity flaws reached confirmed in-the-wild exploitation [5][6][8].
Background
TeamCity is JetBrains’ continuous integration and delivery server. Its architecture separates a central server, which stores project configuration, credentials, and build history, from a fleet of build agents that execute the actual compilation, testing, packaging, and deployment steps. When the server schedules a build, it selects a compatible agent, transmits the build configuration along with whatever parameters and secrets that configuration requires, and later receives logs, test results, and artifacts back from the agent. The agent is therefore a privileged participant in the pipeline: it is trusted to receive sensitive material and trusted to return honest output. That trust is anchored in agent identity, which TeamCity establishes through an agent identifier combined with a per-agent authorization token [3].
According to JetBrains’ advisory, CVE-2026-136858 allows an attacker to “impersonate an existing authorized build agent” and then “intercept builds, access build secrets, and tamper with build results and artifacts” [1][2]. No TeamCity user account is required; an attacker who can reach the server over HTTP(S) and knows or can guess a valid agent identifier can attempt impersonation [1][3]. Security researcher Jiawei Guo privately reported the issue to JetBrains on November 24, 2026, and JetBrains published the advisory, fixed releases, the patch plugin, and the CVE record on December 2, 2026 [1][2][3][4]. JetBrains states that it has already applied the necessary corrective measures to TeamCity Cloud, has found no evidence that any Cloud environment was exploited, and that no action is required by Cloud customers [1][2].
This disclosure arrives against a well-documented history. In December 2023, CISA, the FBI, NSA, and international partners reported that Russia’s Foreign Intelligence Service (SVR, also tracked as APT29) had exploited the TeamCity authentication bypass CVE-2023-42793 at scale, noting that access to software developers’ build systems could position the actor against many downstream victims [5]. In March 2024, CISA added the TeamCity authentication bypass CVE-2024-27198 to its Known Exploited Vulnerabilities (KEV) catalog three days after Rapid7 disclosed that it enabled unauthenticated, complete server compromise [6][7]. Most recently, CISA added the unauthenticated remote code execution flaw CVE-2026-63077 (CVSS 9.8) to KEV in August 2026 with a three-day federal remediation deadline [8][9]. Not every critical TeamCity flaw has followed this path: CVE-2024-23917, a CVSS 9.8 unauthenticated authentication bypass disclosed in February 2024, does not appear in the KEV catalog [13]. Even so, three of the four most recent comparable flaws moved from disclosure to confirmed exploitation, which is why CVE-2026-136858 warrants urgent treatment despite the absence of current exploitation reports.
Security Analysis
The Flaw: Identity Claimed but Not Proven
JetBrains has not published the server-side code change, but Ostorlab’s analysis of the compiled patch plugin offers a plausible picture of the root cause. Ostorlab reports that TeamCity “did not bind a claimed build-agent identity to the authorization token stored for that agent,” so that an unauthenticated client reaching /app/agents could present an existing agent’s identifier with a different token and be treated as that agent [3]. The patch plugin adds a servlet filter that looks up the claimed agent, retrieves the stored authorization token, compares the two in constant time, and rejects the request if the token is missing or mismatched [3]. Ostorlab further indicates that, prior to the fix, the mismatch was logged but the connection was not stopped [3]. Because this account is reconstructed from the patch rather than from vendor source code, it should be read as a well-supported inference rather than a vendor statement; the vendor-confirmed facts are the impact and the affected versions.
The design lesson is broader than TeamCity. Agent identifiers are not designed to be secrets [3]. They are visible to TeamCity users and appear in logs and build metadata, and organizations frequently assign them descriptive names, such as names derived from hostnames, that an outside attacker may be able to guess. An external attacker without prior access may still face a non-trivial discovery step, but a trust decision keyed on an identifier, with the cryptographic credential checked only advisorily, collapses authentication into identification. In the vocabulary of non-human identity (NHI) governance, the build agent is a workload identity whose credential was not actually being verified at the moment of highest consequence, namely when the server decided which machine would receive secrets.
What an Attacker Gains
The consequences of successful impersonation map directly onto the two directions of trust between server and agent. The table below summarizes the impact as described in JetBrains’ advisory and by Ostorlab.
| Trust direction | What the server trusts the agent to do | Consequence of impersonation |
|---|---|---|
| Server → agent (confidentiality) | Receive build configuration, parameters, and secrets for assigned builds | Exposure of “credentials and other secrets passed to the agent” [1][2], potentially including cloud deployment keys, registry tokens, and signing material depending on project configuration |
| Agent → server (integrity) | Return honest logs, test results, and artifacts | Tampering with “build results and artifacts” [1][2]; downstream builds or deployments consuming those artifacts “could execute attacker-supplied code” [1][2] |
| Agent availability | Remain the authoritative executor for its identity | Displacement of the legitimate agent, causing builds to route to the attacker [1][2] |
In our assessment, the confidentiality impact is likely to be the most immediately damaging for many organizations, because CI servers aggregate long-lived credentials precisely so that builds can push images, publish packages, sign releases, and deploy to production. An attacker who receives those credentials can pivot from the build system into cloud accounts and artifact registries without ever touching the TeamCity server itself again. The integrity impact is subtler but potentially larger in blast radius. A tampered artifact that passes through to a package registry or deployment pipeline becomes a software supply chain compromise, which is precisely the downstream-victim scenario the 2023 joint advisory warned about [5].
Exposure and Exploitability
Several factors shape how quickly this vulnerability is likely to be exploited. On the side of rapid weaponization, the attack is unauthenticated, requires only network reachability plus a valid agent identifier, and targets an endpoint that must be exposed to agents by design. JetBrains’ release of a compiled patch plugin also gives researchers and attackers a precise diff to study; Ostorlab’s root-cause write-up appeared within a day of disclosure [3]. On the other side, an attacker needs to know or guess a valid agent identifier and must win builds that carry valuable secrets, which may require timing and persistence. As of December 3, 2026, The Hacker News reported no evidence of active exploitation, and Ostorlab reported no public proof of concept and no KEV listing [2][3].
Network placement matters a great deal. Organizations that expose the TeamCity web interface to the internet, often to support remote developers or cloud-hosted agents, also expose /app/agents unless they have deliberately segmented it. JetBrains’ interim mitigation reflects this: restrict that path at the reverse proxy to known agent source addresses, including “the outbound addresses used by cloud agents and any NAT gateways they connect through” [1][2]. Ostorlab cautions that this control does not fix the underlying flaw and does not stop an attacker who can originate traffic from an allowed address, such as a compromised host on the same internal network or a shared cloud NAT range [3].
Detection Considerations
JetBrains and Ostorlab identify a server log warning containing the text of the existing agent, but different authorization token "<token>" as an indicator [1][3]. A non-empty token in that line suggests a possible takeover attempt, while an empty token is expected during normal operation [3]. Defenders can search for this string in teamcity-server.log, including inside containerized deployments, and should then correlate each hit with the agent’s connection history, source IP, hostname, and the builds and artifacts it handled during the window in question [3]. Ostorlab also notes that a failed attempt may leave no trace and that a log match is a lead rather than proof [3]. Log retention therefore becomes a limiting factor: organizations that rotate TeamCity server logs aggressively may be unable to look back far enough to cover the window between public disclosure and patching.
A practical complication is that the patch plugin does not change the reported server version [3]. Vulnerability scanners and asset inventories that rely on version strings may therefore continue to flag plugin-patched servers as vulnerable. The greater risk is the habit this creates: teams accustomed to dismissing these findings as false positives may suppress alerts on servers where the plugin was never actually installed. Verification should therefore check for the CVE-2026-136858-patch plugin or a fixed release on each server [3].
Recommendations
Immediate Actions
The first priority is to close the vulnerability on every TeamCity On-Premises instance, including staging, departmental, and forgotten servers that may not appear in central inventories. Upgrading to 2026.1.7, 2026.2.3, or 2026.3 is the preferred path because these releases include additional fixes [1][3]. Where an upgrade cannot be scheduled immediately, the security patch plugin supports TeamCity 2021.2 and later; JetBrains states that it can be installed through the administration interface without a restart, and that servers on 2026.2.2 or later can receive it automatically if security patches are set to install automatically [1][3]. Operators running releases older than 2021.2 have no plugin option and should prioritize upgrading or isolating those servers.
In parallel, operators should restrict /app/agents and its subpaths at the reverse proxy to known agent egress addresses, as JetBrains recommends [1][2]. Teams should then search server logs for the mismatched-token warning with a non-empty token and preserve logs, build histories, and artifacts before any cleanup that might destroy evidence [3]. If any suspicious entry is found, or if logs do not cover the full exposure window for an internet-reachable server, the safest assumption is that secrets delivered to affected agents are compromised. In that case, every credential passed to builds on any agent whose identity may have been impersonated should be rotated, extending to all of the server’s agents when log coverage is incomplete, and artifacts produced during the window should be treated as untrusted until rebuilt or verified [3].
Short-Term Mitigations
Over the following weeks, organizations should reduce how much an impersonated agent could obtain even if a similar flaw recurs. Long-lived secrets stored as TeamCity parameters are the highest-value target; replacing them with short-lived, workload-scoped credentials issued at build time, for example through cloud provider workload identity federation or a secrets broker, narrows the window in which stolen material is useful. Agent pools should also be segmented by sensitivity so that production-deploying and release-signing configurations run only on dedicated, tightly controlled agents rather than on a general-purpose pool any registered agent might join. Because this flaw allows impersonation of an existing agent, segmentation should be combined with network controls that restrict which source addresses may register as those agents, so that impersonating a high-value agent requires more than knowing its identifier.
Artifact integrity controls deserve equal attention. Signing artifacts with keys held outside the general agent fleet, recording build provenance, and verifying both at the point of consumption allow downstream systems to reject outputs that did not come from an expected build on an expected agent. Organizations should also bring the TeamCity server under the same exposure management discipline applied to identity providers, since the server effectively issues credentials to machines. If the web interface does not need to be internet-reachable, it should be placed behind a VPN or zero trust access proxy, consistent with JetBrains’ advice that users or agents connecting from outside trusted networks use a VPN or other network access controls [1].
Strategic Considerations
CVE-2026-136858 is at least the fifth critical TeamCity On-Premises vulnerability exploitable without authentication since September 2023, and three of its predecessors (CVE-2023-42793, CVE-2024-27198, and CVE-2026-63077) went on to confirmed in-the-wild exploitation [5][6][8][13]. The pattern suggests that CI servers should be governed as tier-zero infrastructure rather than as developer tooling. The build server holds the keys to production, the authority to publish software, and the trust of every downstream consumer of its artifacts. Organizations should therefore evaluate whether their patch service-level objectives for CI/CD systems match that criticality. The documented disclosure-to-KEV intervals in this product family offer useful benchmarks: roughly three days for CVE-2024-27198 [6][7] and about nine days for CVE-2026-63077 [9], after which CISA set a three-day remediation deadline for federal agencies [8].
More fundamentally, CVE-2026-136858 illustrates why the identity of build infrastructure must be cryptographically verified at every trust decision rather than inferred from identifiers. Build agents, runners, and increasingly AI coding agents that trigger or execute pipeline work are non-human identities that receive privileged material. Inventorying these identities, binding each to a verifiable credential, monitoring for credential mismatches as security events rather than informational logs, and designing pipelines so that no single agent identity can both receive production secrets and emit unverified release artifacts are durable controls that would substantially limit the impact of this class of flaw. Organizations evaluating managed CI services should also weigh the operational reality that, in this case, the vendor remediated its cloud offering centrally while on-premises customers carry the patching and forensic burden themselves [1][2].
CSA Resource Alignment
CSA’s most directly relevant prior work is its research note on the previous TeamCity crisis, CISA’s TeamCity KEV Addition: A Three-Day Deadline, published in August 2026 in response to CVE-2026-63077 [9]. That note examined an unauthenticated remote code execution flaw rather than an identity bypass, but its central argument carries forward: TeamCity servers concentrate credentials and release authority, exploitation follows disclosure quickly, and operators need pre-planned emergency patching and credential rotation procedures for CI infrastructure. CVE-2026-136858 extends the same lesson from the server to the server–agent channel, showing that a server hardened against direct compromise is still only as trustworthy as its verification of the machines it hands secrets to.
CSA’s guidance on non-human identity, Defining Non-Human Identity, provides the conceptual frame for the root cause described here [10]. That paper distinguishes the identity subject from its authentication mechanism and argues for ephemeral rather than static credentials, lifecycle management, and dedicated threat detection for machine identities under Zero Trust principles. A build agent is a workload NHI, and the reported flaw amounts to accepting an identity claim without validating its authentication mechanism. The NHI paper’s recommendations on short-lived credentials and on treating credential anomalies as detection signals align with the short-term mitigations above.
The Six Pillars of DevSecOps: Automation describes CSA’s DevSecOps software delivery pipeline framework and the security activities that belong within it [11]. Its emphasis on securing the pipeline itself, including the integrity of build outputs and the protection of secrets used during delivery, supports the artifact signing, provenance verification, and agent pool segmentation recommended in this note.
Finally, the AI Controls Matrix (AICM) v1.1 provides control objectives that organizations can use to operationalize these recommendations, particularly within its Identity & Access Management; Threat & Vulnerability Management; Application & Interface Security; and Supply Chain Management, Transparency, and Accountability domains [12]. As AI coding agents increasingly author pipeline configuration and trigger builds, AICM’s treatment of AI system supply chains and identity is a natural home for governing the expanded set of non-human actors that interact with CI trust boundaries.
References
[1] Gallo, Daniel. “Critical Security Issue Affecting TeamCity On-Premises (CVE-2026-136858): Update to 2026.1.7, 2026.2.3, or 2026.3 Now.” The JetBrains Blog, December 2, 2026.
[2] Lakshmanan, Ravie. “Critical JetBrains TeamCity Flaw Lets Attackers Hijack Build Agents Without Authentication.” The Hacker News, December 3, 2026.
[3] Ostorlab. “TeamCity Build Agent Auth Bypass (CVE-2026-136858).” Ostorlab Blog, December 3, 2026.
[4] CVE Program. “CVE-2026-136858.” CVE.org, December 2, 2026.
[5] CISA, FBI, NSA, et al. “Russian Foreign Intelligence Service (SVR) Exploiting JetBrains TeamCity CVE Globally (AA23-347A).” Cybersecurity and Infrastructure Security Agency, December 13, 2023.
[6] CISA. “CISA Adds One Known Exploited JetBrains Vulnerability, CVE-2024-27198, to Catalog.” Cybersecurity and Infrastructure Security Agency, March 7, 2024.
[7] Rapid7. “CVE-2024-27198 and CVE-2024-27199: JetBrains TeamCity Multiple Authentication Bypass Vulnerabilities (FIXED).” Rapid7 Blog, March 4, 2024.
[8] Lakshmanan, Ravie. “CISA Flags TeamCity CVE-2026-63077 RCE Flaw Under Active Exploitation in the Wild.” The Hacker News, August 6, 2026.
[9] Cloud Security Alliance. “CISA’s TeamCity KEV Addition: A Three-Day Deadline.” CSA AI Safety Initiative Research Note, August 6, 2026.
[10] Cloud Security Alliance. “Defining Non-Human Identity.” Cloud Security Alliance, July 22, 2026.
[11] Cloud Security Alliance. “The Six Pillars of DevSecOps: Automation.” Cloud Security Alliance, 2020.
[12] Cloud Security Alliance. “AI Controls Matrix (AICM) v1.1.” Cloud Security Alliance, 2026.
[13] National Institute of Standards and Technology. “CVE-2024-23917 Detail.” National Vulnerability Database, February 6, 2024.