Startups & Business

Attackers exploit JetBrains TeamCity authentication bypass

watchTowr reported in-the-wild exploitation of CVE-2026-136858 targeting JetBrains TeamCity On-Premises build agents. Attackers can impersonate trusted workers by guessing predictable build agent IDs to expose credentials or execute malicious code during builds.

Attackers exploit JetBrains TeamCity authentication bypass

Critical Authentication Bypass

I find the exploitation of CVE-2026-136858 against JetBrains TeamCity On-Premises particularly concerning. watchTowr reported "attempted in-the-wild exploitation" to take over build agents just one day after the public disclosure of this Authentication Bypass vulnerability. Researchers explain that exploitation requires guessing a build agent ID, although this is not a real obstacle because these IDs typically start at "1" and are relatively easy to predict. By guessing these IDs, attackers can impersonate trusted workers to receive jobs or expose credentials, and they may also return modified output files that execute attacker-supplied code during later builds. This vulnerability affects all TeamCity On-Premises versions before the current security releases. While watchTowr reports active attempts to hijack workers, JetBrains stated in its December 2 bulletin that it observed no active exploitation. TeamCity On-Premises provides software build and release automation, where build agents act as the worker software that runs jobs the server assigns to them.

Mitigation and detection steps

To fix this issue, users must update to versions 2026.1.7, 2026.2.3, or 2026.3. JetBrains also provides a security patch plugin for 2021.2 and later that installs without a server restart. If the user enables automatic security patch installation, TeamCity 2026.2.2 and later can install this patch unattended. TeamCity Cloud customers need no action because the fix is already applied.

Component Status/Action
TeamCity Cloud Fixed
TeamCity 2026.2.2+ Automatic patching available
Versions < 2026.1.7 Requires manual update

Administrators can detect suspicious activity by checking teamcity-server.log for the line ‘of the existing agent, but different authorization token <token>.’ or by looking for the presence of a non-empty token, which may indicate a takeover attempt. If an administrator finds such a token, they should check the agent connection history and the source IP while reviewing builds around the timestamp to see if the takeover succeeded. I recommend administrators restrict ‘/app/agents’ and its subpaths to the expected source IPs of legitimate build agents. If exploitation occurs, administrators should preserve logs and build results, patch the server, rotate credentials, and treat artifacts as untrusted until verification. This follows a warning from CISA in September 2026 regarding a different TeamCity vulnerability, CVE-2026-63077, which allowed ransomware operators to execute arbitrary OS commands.