Automated Threat Modeling

Quick Look: JetBrains TeamCity CVE-2026-136858 Agent Registration Authentication Bypass Enables Build Agent Takeover

A brief summary of CVE-2026-136858, a CVSS 9.1 authentication bypass in TeamCity On Premises agent registration that lets an unauthenticated attacker impersonate an authorized build agent. Covers the fixed releases, the security patch plugin, and the vendor's log-based detection guidance.

CVE Analysis

9 min read

Gaurav Sarraf
Gaurav Sarraf

2026-12-02

Quick Look: JetBrains TeamCity CVE-2026-136858 Agent Registration Authentication Bypass Enables Build Agent Takeover

Introduction

A newly patched flaw in JetBrains TeamCity On Premises let anyone who could reach the server over HTTP(S) register as a build agent the server already trusted, with no TeamCity account required. CI servers hand their agents both secrets and the job of producing artifacts, so a hijacked agent identity can expose build credentials, falsify results, and push tampered artifacts into downstream pipelines.

TeamCity is the CI/CD server in the JetBrains portfolio, which also includes developer IDEs, AI tools, languages, and team tools. JetBrains, founded in February 2000 and headquartered in Amsterdam, reports more than 12.5 million recurring active users and use by 88% of the Fortune Global Top 100 across its products, although those are company-wide figures and not a TeamCity installation count. Because TeamCity holds build credentials and produces artifacts that other systems consume, a weakness in its agent trust model reaches well past the server itself.

The issue is tracked as CVE-2026-136858, rated CVSS 3.1 9.1 (Critical) by JetBrains as the CVE Numbering Authority, and was reported privately by researcher Jiawei Guo on November 24, 2026.

Technical Information

The agent trust model

In TeamCity, a newly installed agent cannot run builds until an administrator authorizes it. Authorization confirms that the server may work with that agent machine, and the agent must also be connected and enabled before it executes builds. Once authorized, the agent proves its identity to the server with an authorization token that the server issues.

Root cause

JetBrains describes the bug as an "authentication bypass during agent registration allowed takeover of authorized build agents." Before the fix, an unauthenticated party could submit an agent registration that claimed the identity of an existing authorized agent instead of appearing as a new, unauthorized one. The server would let that registration take over the trusted agent's place, which skipped the administrator authorization decision that normally gates build execution.

The weakness is classified as CWE-639, Authorization Bypass Through User Controlled Key: access to another principal's record is not properly prevented when an identifying key is supplied or modified by the caller. Here, the record is an authorized agent identity. MITRE's generic CWE text says such attackers are often authenticated, but JetBrains is explicit that this TeamCity flaw requires neither a user account nor authentication.

A few details are deliberately not public. TeamCity is closed source, and JetBrains has not released a commit, diff, root cause write-up, exact registration parameter, or request format. The advisory does give one telling log message: TeamCity records when a registration arrives naming an existing agent but carrying a different authorization token. That points to the server's handling of this identity and token mismatch as the vulnerable path.

Severity breakdown

The vendor vector is:

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • AV:N, AC:L, PR:N, UI:N: network reachable, low complexity, no privileges, no user interaction
  • S:U: scope unchanged
  • C:H, I:H: high confidentiality and integrity impact, reflecting secret exposure and build tampering
  • A:N: no availability impact in the published vector, even though the advisory notes that the legitimate agent is displaced

Attack flow

Based on the vendor advisory, exploitation proceeds roughly as follows:

  1. The attacker reaches the TeamCity server over HTTP(S). No TeamCity account is needed.
  2. The attacker sends an agent registration that claims the identity of an agent the server has already authorized, presenting an authorization token that differs from the one the server issued.
  3. A vulnerable server accepts the registration, and the attacker takes over that agent's authorized state, displacing the legitimate agent.
  4. Builds assigned to that agent now go to the attacker, along with the credentials and other secrets passed into those builds.
  5. The attacker can return falsified build results and publish tampered artifacts.
  6. Downstream builds that consume those artifacts could execute attacker-supplied code, extending the impact into the software supply chain.

JetBrains notes that /app/agents and its subpaths are the paths legitimate agents use, which is relevant for both network restriction and hunting. Steps 5 and 6 are documented potential consequences, not reports of an observed campaign.

Patch Information

JetBrains fixed CVE-2026-136858 in three TeamCity On Premises releases published on December 2, 2026. The upgrade target depends on your release branch:

  • 2026.1.x branch: upgrade to 2026.1.7
  • 2026.2.x branch: upgrade to 2026.2.3
  • Next major: 2026.3

The advisory says every earlier On Premises version is affected. JetBrains has already fixed TeamCity Cloud, and Cloud customers do not need to do anything.

What the fix changes

No code has been published, so there is no snippet here. From the advisory, the fix lives in the server-side code that handles agent registration and agent identity. Inferred, not confirmed by JetBrains: the patched releases most likely stop a registration with a mismatched token from replacing an existing authorized agent or taking over its authorized state. In practice, an unauthenticated caller can no longer register their way into a trusted agent's identity.

Two ways to get the fix

  1. Full upgrade (recommended). Install 2026.1.7, 2026.2.3, or 2026.3 from the TeamCity downloads page, or use TeamCity's built-in automatic update. A full upgrade also brings in other security fixes that the targeted patch does not.
  2. Security patch plugin. For servers that cannot be upgraded yet, JetBrains released CVE-2026-136858-patch.zip for TeamCity 2021.2 and later. It fixes only this CVE and installs without restarting the server. Delivery depends on version, under Administration, Updates:
    • 2024.03 through 2026.2.1: the plugin appears under Available security updates, where an administrator reviews and applies it.
    • 2026.2.2 and later: under Security patches, choose Install automatically. Servers that already had this setting enabled should fetch and install the patch on their own. With Download and notify, an administrator still applies it from the Updates page. With Ignore, which JetBrains advises against, administrators must find and install patches manually.
    • Other supported versions from 2021.2 on: download the patch plugin and install it by hand.

Restricting network access to the server to trusted systems has also been suggested as an interim, exposure-limiting measure. It does not correct the registration defect.

Verifying the patch

Confirm that the server reports one of the fixed versions, or that the patch plugin is listed as installed. Patching only prevents new takeovers. It does not undo any agent hijack or tampered artifact from before the fix, so complete the post-patch review JetBrains recommends for builds that ran before remediation.

Detection Methods

One public detection signal exists for this CVE: a log string published in the JetBrains advisory. There are no public YARA rules, Sigma rules, or network IDS signatures, so detection relies on careful review of TeamCity server logs and on checking that agent activity matches expectations.

Primary indicator in teamcity-server.log

Search teamcity-server.log for entries containing:

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

The quoted value determines how to read the entry:

  • Empty token (""): normal. JetBrains says these entries are expected and can be ignored for this check. Legitimate agents reconnecting or registering again produce them. Filter them out to avoid false positives.
  • Nonempty token: suspicious. JetBrains says this may indicate an attempt to take over an existing build agent. Treat each hit as a lead, not proof of compromise.

In practice, have your log search or SIEM match the fixed phrase of the existing agent, but different authorization token, then keep only entries where the quoted token is not empty. Server logs rotate, so include archived logs to cover the period before you patched.

Triage for each nonempty token hit

  1. Pivot on the timestamp. Review the affected agent's connection history and the builds assigned to it around that time.
  2. Check agent identity. Confirm the hostname and source IP address match what you expect. An agent suddenly connecting from an unfamiliar host or IP is a strong sign it was displaced.
  3. Check build output. Compare build logs, results, and published artifacts from that window for signs a build ran somewhere it should not have, or that results or artifacts were altered.

Tampered artifacts consumed by downstream builds could run attacker-supplied code, which is why the artifact review matters. A log hit alone does not tell you how far any damage spread.

Supplementary hunting on the agent endpoint

Review reverse proxy or web server access logs for requests to /app/agents and its subpaths from source IPs outside your known agent inventory, counting cloud agent egress addresses and NAT gateways as expected sources. This approach is derived from the advisory, not from a vendor-supplied signature. Correlate it by time with teamcity-server.log hits to strengthen or rule out a lead.

Exposure detection

Treat any network-reachable TeamCity On Premises server running a build earlier than the fixed versions, without the patch plugin installed, as vulnerable. The CVE is also listed in Rapid7's vulnerability database (CVSS 3.1 9.1, AV:N/AC:L/PR:N/UI:N), which helps with scanner-driven inventories.

Limits and response

  • JetBrains knew of no active exploitation at publication, so no field-observed IoCs (attacker IPs, tokens, tooling) exist. A CISA KEV catalog search for the CVE also returned no result. Neither finding rules out unreported exploitation.
  • A nonempty token entry shows an attempt at most. A missing entry is reassuring but not conclusive if logs for the relevant period were rotated away or are missing.
  • If you suspect exploitation, JetBrains advises preserving relevant logs and build results, patching or updating the server, and rotating credentials passed to potentially affected builds.

Affected Systems and Versions

  • Product: JetBrains TeamCity On Premises
  • Affected: all versions before the fixed releases (per the advisory, every earlier On Premises version is affected)
    • 2026.1.x releases before 2026.1.7
    • 2026.2.x releases before 2026.2.3
    • earlier release lines, which are fixed by moving to a fixed release such as 2026.3, or by the patch plugin where supported
  • Patch plugin coverage: TeamCity 2021.2 and later
  • Exposure condition: the server is reachable over HTTP(S) by the attacker. No TeamCity account is required.
  • Not requiring customer action: TeamCity Cloud, which JetBrains has already corrected and where it found no evidence of exploitation through this vulnerability. This does not exempt a customer-operated On Premises server that happens to run on cloud infrastructure.

Vendor Security History

TeamCity has had serious authentication issues before. CVE-2024-27198 and CVE-2024-27199 were fixed in TeamCity 2023.11.4 on March 4, 2024, and JetBrains also shipped a security patch for customers who could not upgrade immediately. JetBrains' account of that case describes a disclosure disagreement with Rapid7: Rapid7 favored publishing technical details alongside the fix, while JetBrains wanted customers to have more time to patch. JetBrains later reported customer server compromises, including one customer's report of encrypted files and a ransomware note linked to CVE-2024-27198.

Separately, CISA warned in February 2024 that CVE-2024-23917 in TeamCity On Premises could allow takeover of an affected system and urged administrators to apply updates or workarounds.

The response to CVE-2026-136858 follows the same pattern: a published advisory, fixed releases across supported branches, a targeted, restart-free patch plugin, and concrete investigation guidance. The 2024 incidents are useful context for prioritization, but they do not establish that the same actors or techniques apply to this CVE.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization