Events Securing Finance in the Age of AI · Secure.com X ZIG Finance · London, 12 Nov Register now

TeamCity Vulnerability Lets Anyone Pose as Your Build Agent, and Attackers Started Within a Day

TeamCity vulnerability CVE-2026-136858 lets anyone pose as a build agent and steal CI secrets. Attackers began probing a day later. Patch it now.

TeamCity vulnerability CVE-2026-136858: a fake build agent with agent ID 1 is accepted by a self hosted TeamCity server

TeamCity Vulnerability Lets Anyone Pose as Your Build Agent, and Attackers Started Within a Day

  • Who should care: Anyone running a self hosted TeamCity server reachable over HTTP or HTTPS. TeamCity Cloud is already fixed.
  • What could go wrong: A stranger with no account poses as your build agent, takes its secrets and hands back poisoned artifacts.
  • Do this: Patch to 2026.1.7, 2026.2.3 or 2026.3, then search teamcity-server.log.
  • Worth remembering: Earlier critical TeamCity flaws landed on CISA’s Known Exploited Vulnerabilities list soon after disclosure.

Introduction

A critical TeamCity vulnerability lets anyone who can reach your build server claim to be one of its agents, and the server believes them. About a day after JetBrains shipped the fix, attackers were already testing it on honeypots.

What Happened?

JetBrains disclosed CVE-2026-136858 on December 2 and scored it 9.1 under CVSS 3.1. The bug lives in agent registration at /app/agents. A request carrying a real agent’s ID with the wrong authorization token got logged as a mismatch, then let through anyway. No TeamCity account is needed. On December 3, a threat intelligence firm reported attempts to exploit the TeamCity vulnerability on its honeypots, with attackers counting agent IDs up from 1.

TeamCity vulnerability attack flow: reach the server at /app/agents, claim a real agent ID, the server accepts the token mismatch, then secrets go out and tampered artifacts come back

What’s the Impact?

Build servers hold deploy keys, cloud tokens and signing material. A fake agent receives the jobs meant for a real one, plus every secret those jobs carry. It can also return tampered artifacts that your own pipeline signs and ships to customers. That turns this TeamCity vulnerability into a supply chain problem as well as a data theft problem.

How to Avoid This

  • Patch or plug: Upgrade to a fixed release, or install the security patch plugin (2021.2 and later, no restart). Confirm it under Administration > Plugins, since the version number won’t change.
  • Fence /app/agents: At the reverse proxy, allow it only from your agents’ IPs, including cloud egress and NAT gateways. Treat this as a stopgap mitigation until the patch is in.
  • Grep one line: Search teamcity-server.log for “of the existing agent, but different authorization token”. An empty token is normal. A filled one is a lead.
  • Chase each lead: Check that agent’s source IP, hostname and recent builds against the machine you know.
  • Rotate and rebuild: If a hit looks real, keep the logs, rotate every credential those builds touched and rebuild their artifacts. Failed attempts may leave no trace, so a clean log is reassuring, but it is not proof.

TeamCity Vulnerability: Indicators of Compromise

No attacker IP addresses, file hashes or domains have been published yet. The log and behavior signs to hunt for are below.

TeamCity vulnerability indicators of compromise: token mismatch log entry, requests to /app/agents from unknown IPs, sequential agent ID guessing, agent drift and build anomalies, plus a grep hunt command

The Machine That Ships Your Code Needs Someone Watching It

Most teams patch the firewall first and remember the CI server later. Secure.com runs security as a service, with human experts making the calls.

  • Managed Exposure Management can find internet facing TeamCity servers, rank them against live exploitation and check that the fix landed.
  • Managed SecOps watches for agent registrations from unknown addresses and token mismatch entries, then investigates each one.
  • When a hit looks real, our experts help trace the affected builds and work with your engineers on credential rotation and clean rebuilds.
  • Your team approves every high impact action, on one service and one bill.

FAQs

What is the TeamCity vulnerability CVE-2026-136858?
It is a critical flaw in how TeamCity registers build agents at /app/agents. A request carrying a real agent's ID and the wrong authorization token was logged as a mismatch and then accepted, so anyone who can reach the server could pose as that agent without an account.
Is the TeamCity vulnerability being exploited?
Exploitation attempts were seen on honeypots on December 3, 2026, about a day after JetBrains disclosed the flaw. Attackers were guessing agent IDs by counting up from 1, which is easy because IDs start at 1.
Which TeamCity versions fix CVE-2026-136858?
TeamCity 2026.1.7, 2026.2.3 and 2026.3 fix the flaw. Teams that can't upgrade right away can install the security patch plugin on 2021.2 and later without a restart. TeamCity Cloud is already fixed.
How do I check if my TeamCity server was targeted?
Search teamcity-server.log for "of the existing agent, but different authorization token". An empty token is normal, while a filled one is a lead to check against the agent's known IP address and hostname. Failed attempts may leave no trace, so a clean log is not proof.
What should I do if I find a suspicious build agent?
Keep the logs, rotate every credential the affected builds touched and rebuild their artifacts on a clean agent. Treat any artifact built on the suspicious agent as untrusted until it is rebuilt.