TeamCity On-Premises flaw lets an unauthenticated attacker pose as a build agent and receive its build secrets

JetBrains rates CVE-2026-136858 at 9.1 and publishes a log check. Patch or install the plugin today, then look for impostor agents.

Advisory page with the phrase impersonate an existing authorized build agent highlighted, showing an impostor agent

JetBrains said on Dec. 2 that an unauthenticated attacker who can reach a TeamCity On-Premises server over HTTP(S) may impersonate an existing build agent and receive the secrets passed to its builds. Patch or install JetBrains' patch plugin today, then run its log check for impostor agents.

What the flaw gives an attacker

JetBrains said the flaw affects all TeamCity On-Premises versions and the attacker needs no TeamCity user account. JetBrains said a successful attack could displace a legitimate agent and intercept builds assigned to it, which can expose credentials and other secrets passed to that agent. By that description, the secrets at risk are those handed to builds the impostor receives, not every secret on the server. JetBrains also said an attacker could falsify build results or publish tampered artifacts, and downstream builds that consume them "could execute attacker-supplied code."

TeamCity Cloud customers need no action; JetBrains said it found no evidence that any Cloud environment was exploited. The NVD record lists the flaw as rated 9.1 by JetBrains; NVD has not scored it. Jiawei Guo reported it to JetBrains on Nov. 24, which is eight days before the Dec. 2 advisory.

Why not wait for exploitation reports

As of Dec. 3, JetBrains' advisory says it was not aware of active exploitation, and the flaw is not in CISA's KEV catalog. An unverified script and a scanner template labeled as proofs of concept for the flaw have appeared on GitHub since late Dec. 2. CISA's assessment in the NVD record, dated Dec. 2, lists exploitation "none", automatable "yes" and technical impact "total".

The last agent-protocol flaw followed a different path. When JetBrains disclosed CVE-2026-63077, an unauthenticated remote code execution flaw "via the agent polling protocol," on Jul. 27, it said it was "not aware of any active exploitation," Help Net Security reported. CISA added it to KEV on Aug. 5, nine days later, marked "Known" for ransomware use. CISA's catalog marks three earlier TeamCity flaws the same way: CVE-2023-42793, CVE-2024-27198 and CVE-2024-27199.

Patch, check, then restrict

The platform team should update today to 2026.1.7, 2026.2.3 or 2026.3. If it cannot, JetBrains' security patch plugin covers 2021.2 and later, installs without a restart and fixes only this CVE. On 2024.03 through 2026.2.1, apply pending patches under Administration | Updates. JetBrains said servers on 2026.2.2 or later with "Install automatically" enabled "should" install the patch themselves, so confirm it under Administration | Updates instead of assuming.

Also today, security should search teamcity-server.log for JetBrains' string of the existing agent, but different authorization token "<token>". JetBrains said a non-empty token may indicate an attempt to take over an agent; entries with an empty token ("") are expected and can be disregarded. For each non-empty hit, JetBrains said to use the timestamp to review that agent's connection history and assigned builds, confirm the hostname and source IP match what you expect, and compare with build logs, results and artifacts. If you suspect exploitation, JetBrains said to preserve logs and build results, patch, rotate credentials passed to potentially affected builds, treat their artifacts as untrusted until verified, and trace where they were deployed.

We would go further than JetBrains: for a server that was reachable from the internet and unpatched after Dec. 2, security should decide this week whether to rotate credentials passed to its builds even without a log hit.

This week, network engineering should restrict /app/agents. JetBrains said to allow it and its subpaths at the reverse proxy only from IPs where legitimate agents originate, including outbound addresses of cloud agents and NAT gateways they connect through. JetBrains also said to keep the server on trusted networks or behind a VPN and to run server and agents on separate hosts.

More in News

All in this topic