TeamCity CVE-2026-136858: Attackers Are Trying to Hijack Your Build Agents
One day after JetBrains disclosed a critical authentication bypass in TeamCity On-Premises, watchTowr reported attempted exploitation in the wild, aimed at taking over build agents (BleepingComputer, Dec 4, 2026).
One day after JetBrains disclosed a critical authentication bypass in TeamCity On-Premises, watchTowr reported attempted exploitation in the wild, aimed at taking over build agents (BleepingComputer, Dec 4, 2026).
What the flaw is
CVE-2026-136858 is an authentication bypass in JetBrains TeamCity On-Premises, the self-hosted edition. It lets an attacker impersonate a build agent the server already trusts and receive jobs meant for it. Exploitation requires guessing an agent ID. According to the report, these IDs usually start at 1 and are easy to predict.
Why build agents matter
A build agent runs the jobs the server assigns: compile, test, deploy. A fake agent could get credentials passed to those jobs, report false build results, or return modified output files that run attacker code in later builds.
Fixed versions
JetBrains published a bulletin on December 2 recommending an update to 2026.1.7, 2026.2.3 or 2026.3. All earlier On-Premises versions are affected. A security patch plugin exists for 2021.2 and later and installs without a server restart. On 2026.2.2 and later, the patch can install unattended if automatic security patch installation is on. TeamCity Cloud is already fixed.
Signs of compromise and mitigations
JetBrains says it had observed no active exploitation when it published, while watchTowr reports attempts. Two signals to check: a teamcity-server.log line saying "of the existing agent, but different authorization token", and a non-empty token on an agent. If either appears, review the agent's connection history, source IP and builds around that time. If exploitation is suspected: keep logs and build results, patch, rotate credentials passed to possibly affected builds, and treat artifacts as untrusted until verified. A further mitigation is to restrict /app/agents and its subpaths to the IPs of legitimate agents.
Lesson for CI/CD
BleepingComputer notes that in September 2026 CISA warned of ransomware operators using another TeamCity flaw, CVE-2026-63077. CI servers hold secrets and ship code. Keep them patched, off the open internet, and limit who can connect agents.
Sources
- JetBrains TeamCity blog, security bulletin, Dec 2, 2026 — https://blog.jetbrains.com/teamcity/2026/12/cve-2026-136858/
- BleepingComputer, Dec 4, 2026 — https://www.bleepingcomputer.com/news/security/critical-jetbrains-teamcity-flaw-exploited-to-hijack-build-agents/
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.