CVE-2026-136858: TeamCity Auth Bypass Now Under Attack

CVE-2026-136858 lets attackers impersonate TeamCity build agents and steal secrets. watchTowr sees exploitation attempts. Patch to 2026.3 now.

By Vivek • • 5 Min Read • 0 • Follow on Google News Add to Preferred Source
TeamCity CVE-2026-136858

Attackers are already probing TeamCity servers for CVE-2026-136858, a critical authentication bypass that lets anyone who can reach an unpatched TeamCity On-Premises server pose as one of its build agents and collect the secrets passed to its builds, threat intelligence firm watchTowr said on Thursday.

JetBrains disclosed CVE-2026-136858 on Wednesday, December 2, and rates it 9.1 on the CVSS v3.1 scale. The flaw sits in the build agent registration process, affects every TeamCity On-Premises release before the fixed builds, and needs no TeamCity user account to exploit, only HTTP(S) access to the server and a valid agent ID.

That agent ID requirement was meant to be the hard part. watchTowr said its watchTowr Intel service is seeing exploitation attempts and that guessing an active agent ID is “not a material barrier” because TeamCity numbers agents from 1.

As of December 4, fixes are available in TeamCity 2026.1.7, 2026.2.3 and 2026.3, plus a standalone security patch plugin for TeamCity 2021.2 and later. JetBrains has already fixed TeamCity Cloud.

How the TeamCity Agent Impersonation Flaw Works

TeamCity splits work between a central server, which holds projects, credentials and build configurations, and build agents, the machines that check out code and run the builds. Agents register with the server and then receive build jobs along with any parameters, tokens and passwords those jobs need.

CVE-2026-136858 breaks the trust check in that registration step. According to JetBrains’ advisory, an unauthenticated attacker can impersonate an existing authorized agent, displace the real one and intercept the builds assigned to it. The attacker then receives the credentials and other secrets sent to that agent, and can return falsified build results or publish tampered artifacts, so any downstream build that consumes those artifacts would run attacker-supplied code.

JetBrains has not published the root cause. Security firm Ostorlab, which analysed the patch, says that before the fix the server logged a mismatched agent authorization token but did not block the connection. The fix adds a servlet filter that looks up the claimed agent, compares its stored token in constant time and rejects missing or mismatched tokens. JetBrains has not confirmed that description.

The CVE record classifies the weakness as CWE-639, authorization bypass through a user-controlled key. Security researcher Jiawei Guo reported the vulnerability to JetBrains privately on Tuesday, November 24, eight days before disclosure.

Is CVE-2026-136858 Being Exploited?

JetBrains said it was not aware of active exploitation when it published the advisory on December 2, and found no evidence that any TeamCity Cloud environment had been abused. A day later, on December 3, watchTowr publicly reported attempted exploitation of CVE-2026-136858 in the wild.

watchTowr has not said how many servers were targeted, whether any attempt succeeded, or who is behind the traffic. Cyber Kendra found no public proof-of-concept exploit, and CVE-2026-136858 was not listed in CISA’s Known Exploited Vulnerabilities catalog at the time of writing.

TeamCity flaws have moved quickly from disclosure to attack before. CVE-2026-63077, an unauthenticated remote code execution bug in the agent polling protocol rated 9.8, was disclosed on July 27 and added to the KEV catalog on August 5. Russia’s SVR exploited the earlier authentication bypass CVE-2023-42793 at scale, according to a joint CISA, FBI and NSA advisory, and CISA added CVE-2024-27198 to KEV in March 2024.

Which TeamCity Versions Fix CVE-2026-136858

TeamCity edition or branchStatus as of December 4, 2026Fix
TeamCity 2026.3Fixed2026.3
TeamCity 2026.2.xFixed2026.2.3 or later
TeamCity 2026.1.xFixed2026.1.7 or later
TeamCity 2021.2 to 2025.11Vulnerable, no fixed releaseUpgrade, or install the security patch plugin
TeamCity before 2021.2Vulnerable, no plugin supportUpgrade only
TeamCity CloudFixed by JetBrainsNo action needed

The TeamCity security patch plugin fixes only CVE-2026-136858 and can be installed from the administration interface without restarting the server. Servers on 2026.2.2 or later that are set to install security patches automatically can receive it without admin action.

The plugin does not change the version number a TeamCity server reports, so vulnerability scanners may continue to flag patched servers as exposed. Admins should confirm the plugin, named CVE-2026-136858-patch, is installed on each server rather than relying on the version string.

What TeamCity Admins Should Do Now

Upgrade TeamCity On-Premises to 2026.1.7, 2026.2.3 or 2026.3. Where an immediate upgrade is not possible, install the security patch plugin on TeamCity 2021.2 or later. Servers older than 2021.2 have no plugin option and need a full upgrade.

JetBrains also lists a network mitigation: configure the reverse proxy, or another path-aware access control, to accept requests to /app/agents and its subpaths only from known build agent IP addresses, including the outbound addresses of cloud agents and any NAT gateways they use. Ostorlab notes this restriction reduces exposure but does not fix the flaw, and does not stop an attacker sending traffic from an allowed address.

To look for takeover attempts, JetBrains advises searching teamcity-server.log, including logs inside containers, for the warning of the existing agent, but different authorization token "<token>". On a Linux host, grep 'but different authorization token' <TeamCity Home>/logs/teamcity-server.log* will surface those lines. A non-empty token value may indicate a takeover attempt; an empty token is normal behaviour.

A log match is a lead rather than proof, and a failed attempt may leave no trace. Correlate any hit with the agent’s connection history, source IP address, hostname and the builds it ran. If impersonation cannot be ruled out, rotate every credential delivered to the affected agents, or to all agents if logs are incomplete, and treat build artifacts from the exposure window as unverified. Preserve logs, build histories and artifacts before cleaning up.

Community Discussion

Join the conversation. Ask questions, share solutions, and help others.

0 Comments

Be the first to start the discussion!

Leave a Comment

Your email address will not be published. Required fields are marked *

We respect your privacy, your information is safe with us.

Latest Articles

View all