# JetBrains TeamCity flaw exploited in the wild to steal dev credentials

> Source: <https://www.csoonline.com/article/4256998/jetbrains-teamcity-flaw-exploited-in-the-wild-to-steal-dev-credentials.html>
> Published: 2026-12-04 21:38:13+00:00

**Recommendation:** Search teamcity-server.log for non-empty-token agent authorization mismatches and restrict /app/agents/ to expected build-agent IPs, since attackers are guessing sequential agent IDs to steal credentials.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

A critical authentication bypass in the popular JetBrains TeamCity CI/CD server is being exploited in the wild, with attackers able to intercept development credentials and access tokens passed to build agents during workflows. The flaw started being exploited within a day of public disclosure, highlighting the [shrinking patch windows](https://www.csoonline.com/article/4156005/patch-windows-collapse-as-time-to-exploit-accelerates.html) enterprises face in the age of AI-assisted patch analysis and exploit development.

The flaw, tracked as [CVE-2026-136858](https://www.cve.org/CVERecord?id=CVE-2026-136858), allows an unauthenticated attacker who can reach a TeamCity server over HTTP or HTTPS to pose as an existing authorized build agent without a user account. In addition to capturing credentials and other secrets the impersonated build agents receives from the server, attackers can use their access to falsify build results and publish tampered artifacts that other workflows could later execute.

Security firm watchTowr, which operates a global network of honeypots, [captured exploitation attempts](https://watchtowr.com/intelligence/jetbrains-teamcity-authentication-bypass-cve-2026-136858/) Thursday, less than a day after JetBrains released patches for the vulnerability. The attackers observed so far are simply guessing the ID numbers of long-running build agents, which typically start at 1 and count upward.

“If we’d told security teams 10 years ago that we’d be measuring how many minutes or hours it takes after disclosure for exploitation to be observed, especially for ‘celebrity’ or ‘attractive’ vulnerabilities affecting edge devices and internet-facing software, they would have laughed,” Jake Knott, head of threat intelligence at watchTowr, told CSO. “This is the new reality, though.”

All on-premises versions of TeamCity are affected, JetBrains said in [its advisory](https://blog.jetbrains.com/teamcity/2026/12/cve-2026-136858/). The company fixed the flaw in versions 2026.1.7, 2026.2.3, and 2026.3 and released a security patch plugin for servers running versions 2021.2 or later that cannot be immediately upgraded. TeamCity Cloud instances have already been patched server-side.

This is the second pre-authentication flaw in TeamCity’s agent functionality exploited in the wild this year. The first, CVE-2026-63077, was [a critical RCE flaw in the agent polling protocol](https://www.csoonline.com/article/4203872/jetbrains-says-a-crafted-http-request-could-break-teamcity.html) that JetBrains patched in July. In March 2024, [two other TeamCity flaws were mass-exploited within days of disclosure](https://www.csoonline.com/article/1312183/teamcity-supply-chain-bugs-receive-massive-exploitation.html), with attackers creating hundreds of rogue administrator accounts on servers.

The exploit attempts seen by watchTowr appear to come from a threat actor hunting for high-impact vulnerabilities. The same attacker recently exploited [the PHP2Shell flaw](https://www.csoonline.com/article/4241941/php2shell-will-persist-in-enterprise-environments-for-years.html) against a Palo Alto PAN-OS device in watchTowr’s honeypot network.

JetBrains recommends searching `teamcity-server.log` for entries with the text: `of the existing agent, but different authorization token “”`. However, only entries that present a non-empty  `are suspicious.`

“If you find an entry with a non-empty token, use its timestamp to review the affected agent’s connection history and any builds assigned to it around that time,” the company said. “Verify that the hostname and source IP address match what you expect for that agent. Compare your findings with the build logs, build results, and published artifacts to determine whether the attempt succeeded.”

As an additional mitigation, organizations could restrict access to the server’s `/app/agents/` paths to only the IP addresses they expect legitimate build agents to originate from. If successful exploitation is suspected, any credentials passed to the potentially affected builds should be rotated and the artifacts resulting from those builds should be treated as untrusted and verified.
