Critical JetBrains TeamCity flaw exploited to hijack build agents

Critical JetBrains TeamCity flaw exploited to hijack build agents

Hackers are targeting JetBrains TeamCity On-Premises in attacks that exploit a critical vulnerability tracked as CVE-2026-136858 to hijack build agents.

The activity was observed just one day after the public disclosure, according to data from offensive security company watchTowr.

“The watchTowr team is rapidly reacting to CVE-2026-136858 across our client base, a recently disclosed Authentication Bypass vulnerability affecting JetBrains TeamCity,” the security company warned.

image

“Only one day after initial disclosure, watchTowr Intel is already observing attempted in-the-wild exploitation, trying to take over build agents.”

The researchers explained 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.

TeamCity On-Premises is the self-hosted edition of JetBrains’ platform for software build and release automation, used by developers to compile code, run tests, and automatically deploy software.

A build agent is the worker software that runs the job the TeamCity server assigns it. CVE-2026-136858 allows an attacker to impersonate a worker the server already trusts and receive jobs intended for it.

This could expose credentials passed to those jobs or let an attacker report false build results or return modified output files that could execute attacker-supplied code when used in later builds.

Fixes available

JetBrains published a bulletin on December 2, “strongly recommending” that all users update to versions 2026.1.7, 2026.2.3, and 2026.3, which address the issue.

The flaw affects all TeamCity On-Premises versions before those versions.

JetBrains also offers a security patch plugin for 2021.2 and later that can be installed without restarting the server.

On 2026.2.2 and later, TeamCity can install the patch unattended if automatic security patch installation is enabled.

TeamCity Cloud has already received the fix, so cloud customers need to take no action.

The vendor’s bulletin notes that they have observed no active exploitation of the flaw, but shares two signs of suspicious activity administrators should check for.

Users should check teamcity-server.log entries for the line ‘of the existing agent, but different authorization token <token>.’

The second signal is the presence of a non-empty token, which may indicate a takeover attempt.

If such a token is found, it is recommended to check the agent’s connection history, source IP, and builds around the timestamp to determine whether the attempt succeeded.

If exploitation is suspected, JetBrains advises preserving logs and build results, patching the server, rotating credentials passed to potentially affected builds, and treating their artifacts as untrusted until verified.

An additional mitigation provided in the bulletin is to restrict ‘/app/agents’ and its subpaths to the expected source IPs of legitimate build agents.

In September 2026, CISA warned federal agencies that ransomware operators were targeting another JetBrains TeamCity On-Premises vulnerability, CVE-2026-63077, to execute arbitrary OS commands on targets.

3,000 AI builds later, ask us anything

On December 15th, join Eoin Hinchy, our co-founder and CEO; Martin Moroney, our Head of AI Transformation; and Christina Troy, our Sr. Manager, IT for an open conversation about what worked, what didn't, and what we learned along the way.

Bring your questions and get candid insights!

Register and ask your question

进一步分析

免费工具,针对本文主题进一步深挖分析:

source: BleepingComputer