Skip to content
Hacker Posts
VulnerabilityCVE-2026-136858

JetBrains TeamCity agent hijack (CVE-2026-136858) now exploited

watchTowr reports in-the-wild exploitation attempts against CVE-2026-136858 one day after disclosure. All TeamCity On-Premises versions are affected; fixes are in 2026.1.7, 2026.2.3 and 2026.3.

Hacker Posts DeskPublished Updated 4 min read

JetBrains has patched CVE-2026-136858, a critical flaw in TeamCity On-Premises that lets an unauthenticated attacker impersonate an authorized build agent. The payoff is build interception — displace a legitimate agent, catch the builds assigned to it, and harvest whatever secrets those builds carry. Update (Dec 4): one day after disclosure, offensive-security firm watchTowr says it is observing in-the-wild exploitation attempts; JetBrains still reports no active exploitation of its own. Patch now — a CI server is one of the highest-value boxes on a network.

The primary source is the JetBrains security advisory; the NVD entry carries the scoring.

What the flaw does

Per JetBrains, an unauthenticated attacker who can reach a TeamCity server over HTTP(S) can impersonate an existing authorized build agent. This is agent hijack, not a login bypass. A successful exploit can:

  • Displace a legitimate build agent and intercept builds routed to it, exposing credentials, tokens and other secrets passed to the agent.
  • Falsify build results.
  • Publish tampered artifacts — the supply-chain outcome that makes a CI compromise dangerous well beyond the server itself.

The flaw is rated CVSS 9.1. watchTowr notes the practical barrier is thin: TeamCity numbers its agents sequentially from 1, so an attacker has little to guess when picking an agent identity to impersonate.

Affected versions

  • All TeamCity On-Premises versions are vulnerable.
  • TeamCity Cloud is not affected — JetBrains says no action is required there.

Fixed builds: 2026.1.7, 2026.2.3 and 2026.3. For servers on 2021.2 or later that can't take a full upgrade-and-restart immediately, JetBrains ships a security-patch plugin.

Exploitation status

The two primary readings disagree, and the gap is worth stating plainly:

  • watchTowr reported on December 3 that it is "already observing attempted exploitation" against the flaw on its honeypot network — roughly a day after JetBrains disclosed it. The exploitation reporting was picked up by BleepingComputer, Help Net Security and others.
  • JetBrains maintains in its advisory that it has observed no active exploitation. This is client-telemetry versus vendor-visibility — treat watchTowr's honeypot hits as early scanning/attempt activity, not confirmed compromises.

The CVE is not in CISA's KEV catalog as of this writing. The flaw was responsibly disclosed by researcher Jiawei Guo on November 24, 2026; no public PoC accompanies the advisory. Either way, the window between disclosure and mass exploitation of a TeamCity bug has historically been short — see the context below.

Per BleepingComputer, a takeover attempt leaves a trace in teamcity-server.log: a line noting a reconnecting agent presenting a mismatched token.

... of the existing agent, but different authorization token: <token>

A non-empty token in that message is the signal to investigate. JetBrains advises reviewing the log for these authorization-token mismatches on existing agents.

Action checklist

  1. Upgrade to 2026.1.7, 2026.2.3 or 2026.3, matching your branch, from the JetBrains advisory. If you can't restart now and you're on 2021.2+, install the security-patch plugin instead.
  2. Get any internet-exposed TeamCity server off the public internet immediately. With attempts now reported in the wild, exposed servers are the urgent case — this flaw needs nothing but network reach.
  3. Until patched, apply JetBrains's interim mitigation: put a reverse proxy in front of the server that allows requests to /app/agents and its subpaths only from expected build-agent IP addresses — including outbound addresses for cloud agents and any NAT gateways.
  4. Grep teamcity-server.log for the authorization-token-mismatch line above. If you find one, preserve logs and build results, rotate every credential and token that passed through affected builds, and treat those builds' artifacts as untrusted until verified.
  5. Review agent connection history — source IP and the builds around any suspicious timestamp.

Context

TeamCity has been a repeated target because the reward is so high: the box that builds and signs your software sees every secret in the pipeline. In 2024 JetBrains patched a TeamCity authentication-bypass pair that was mass-exploited within days — by state actors and ransomware crews alike — once details were public, and CVE-2026-63077, patched this past summer, landed in CISA KEV within about a week. CVE-2026-136858 is tracking the same curve: exploitation attempts inside 24 hours of disclosure, before any KEV listing. Build-agent impersonation is a quieter primitive than a straight auth bypass, but it lands in the same place — control of the pipeline.