Security & Privacy

Attackers exploit TeamCity vulnerability to hijack build agents

Attackers are exploiting the CVE-2026-136858 authentication bypass vulnerability in TeamCity On-Premises to impersonate trusted workers. This takeover allows unauthorized actors to expose credentials or execute malicious code, potentially compromising the software supply chain.

Attackers exploit TeamCity vulnerability to hijack build agents

Hijacking build agents

I find the rapid exploitation of the CVE-2026-136858 Authentication Bypass vulnerability extremely concerning. watchTowr reported that the activity occurred just one day after the initial disclosure. TeamCity On-Premises is the self-hosted edition of JetBrains’ platform for software build and release automation, used by developers to compile code and run tests to automate software deployment. The vulnerability allows an attacker to impersonate a trusted worker and receive jobs intended for that specific worker. This exploitation targets the self-hosted edition of the TeamCity platform. Researchers explain that because build agent IDs typically start at "1" and remain easy to predict, attackers can target specific workers without significant difficulty. This takeover enables an attacker to expose credentials passed to jobs or return modified output files that execute attacker-supplied code during later builds when those files are used. This threat could compromise the software supply chain for any company using this automation platform to compile or deploy software.

Remediation and detection

JetBrains published a security bulletin on December 2 to address these risks. I find the requirement for manual updates across multiple versions tedious, though necessary to secure the production environment.

Target Version Recommended Action
TeamCity Cloud No action required
TeamCity On-Premises < 2026.1.7 Update to 2026.1.7, 2026.2.3, or 2026.3
TeamCity 2021.2 and later Install security patch plugin
TeamCity 2026.2.2 and later Enable automatic security patch installation

Administrators can identify suspicious activity by searching teamcity-server.log for the line: ‘of the existing agent, but different authorization token <token>.’ The presence of a non-empty token also indicates a possible takeover attempt by an unauthorized actor. If an administrator detects such activity, they should check the connection history, the source IP, the builds, and the timestamps to see if the attempt succeeded. In the event of suspected exploitation, JetBrains advises users to preserve logs and build results, patch the server, rotate credentials, and treat all artifacts as untrusted until they can verify them. Administrators can also mitigate the risk by restricting ‘/app/agents’ and its subpaths to the expected source IPs of legitimate build agents. The September CISA warning involved a different TeamCity On-Premises vulnerability, CVE-2026-63077, which allows ransomware operators to execute arbitrary OS commands on their targets.