Latest

Cybersecurity

TeamCity software exploited one day after the advisory

CVE-2026-136858, 9.1: an attacker without an account can impersonate a TeamCity build agent and make off with its secrets. Attempts are already being seen on the network.

Translated from Spanish by an automated system. The Spanish original prevails. Read the Spanish original

Screen with color-coded source code on a dark background
Image: Unsplash

A continuous integration server is the box where a company keeps the keys to almost everything: repository credentials, deployment tokens, cloud access and artifacts that are later run in production. TeamCity On-Premises, one of the most widely used platforms for building and publishing software, has spent a week with a critical vulnerability open at the door of that box. The flaw allows someone without an account to pose as a legitimate build agent and receive the work the server assigns to it.

CVE-2026-136858 scores 9.1 out of 10, belongs to the family of authorization bypasses via user-controlled key (CWE-639) and affects all On-Premises versions prior to 2026.1.7, 2026.2.3 and 2026.3. JetBrains published the TeamCity advisory on December 2, and offensive security firm watchTowr detected exploitation attempts on December 4, one day after the vulnerability became public. The security plugin allows the fix to be applied without a restart, an option designed for teams that cannot stop building.

Exploitation requires no credentials and simply reaching the server over HTTP or HTTPS is enough. The attacker impersonates an existing agent, reads the secrets of the builds directed at it and can publish tampered artifacts.

What does the flaw allow?

The record for CVE-2026-136858 sums it up as an authentication bypass during agent registration that allows taking control of authorized agents. An agent is the process that runs the jobs the server sends it, and the server trusts it because it registered earlier with a token. If another process can present itself as that agent, the server hands over the work without asking.

The weakness lies in how that identity is validated during registration. The agent identifier is usually a sequential number starting at 1, and guessing it requires no special effort. With the correct identifier, the attacker takes the place of the legitimate agent and waits for a build containing secrets to arrive.

Agent registration happens over HTTP, so any machine with network access to the server can try. No prior session or token is needed, and an internal address is not mandatory either if the server is exposed. The risk that survives the patch is the poisoned artifact deployed weeks later.

JetBrains describes three consequences: intercepting builds, accessing their secrets and tampering with the results. The fourth, which does not appear in the summary but follows from its own advisory, is that any later build consuming those artifacts inherits the problem. An altered binary in the internal repository can end up in production weeks later.

The 48-hour timeline

Researcher Jiawei Guo reported the flaw to JetBrains on November 24, within the company's coordinated disclosure program. Eight days later, on December 2, came the bulletin with the fixed versions and a security plugin for those unable to update. The advisory acknowledged at the time that the company had no knowledge of active exploitation.

Two days later, watchTowr reported that its team was seeing attempts against customers: "just one day after the initial disclosure," in the firm's words. The gap between "no knowledge" and "attempts are underway" is measured in hours, and that margin is common in continuous integration vulnerabilities, where automated scanners sweep the internet looking for exposed servers.

Version Status
Prior to 2026.1.7 Affected
2026.2.x prior to 2026.2.3 Affected
2026.1.7 Fixed
2026.2.3 Fixed
2026.3 Fixed
TeamCity Cloud Fixed by JetBrains

Ireland's National Cyber Security Centre published its own advisory on December 4, with the 9.1 score and an EPSS of 1.54%, the estimated probability that the flaw will be exploited in the next 30 days. The Belgian center did the same that day and urged installing the updates with the highest priority after testing them.

How to tell if it has been attempted?

JetBrains includes a concrete clue in the bulletin: search `teamcity-server.log` for the string "of the existing agent, but different authorization token". If the token on that line is not empty, someone tried to impersonate an already registered agent. Entries with an empty token are normal and can be ignored.

When a line with a token appears, the advisory calls for checking that agent's connection in that time window and comparing the source IP address with the expected one. Then come the build logs, results and published artifacts, to find out whether the attempt succeeded. If in doubt, the recommendation is to preserve the logs, update the server and rotate any credential that was passed to those builds.

The other measure is network-level: restrict access to `/app/agents` and its child paths to the IP addresses from which legitimate agents connect, including the NAT egress of cloud agents. A reverse proxy with path-based control solves the problem without touching the server, and works both for this flaw and for the next one.

What to patch and in what order?

Updating to 2026.1.7, 2026.2.3 or 2026.3 fixes the flaw. For those unable to move versions, there is a security plugin compatible with 2021.2 and later that installs without restarting the server. In versions 2026.2.2 and later, TeamCity can download and install security patches automatically if that option is enabled.

Order matters. Servers directly exposed to the internet go first, then those building artifacts deployed to production with cloud credentials. A TeamCity behind a VPN carries less immediate risk, though it remains a target for anyone already inside the network.

There is a detail that is often overlooked: the JetBrains advisory also recommends running the server and the agents on separate machines. That separation does not prevent the flaw, and it reduces the damage when an agent is compromised, because build secrets do not live on the same host as the web interface.

A compromised agent also opens up the internal network. From that machine, repositories, container registries and databases that the build server does not expose are visible, and the attacker inherits the trust the network grants a build machine. At that point the flaw stops being a TeamCity problem.

The build chain as loot

For years, an attacker's favorite target was the production server. The build chain offers something better: trust. An artifact signed by the continuous integration system enters production without anyone looking twice, and the attacker only needs to touch the process that generates it.

That pattern explains why flaws in CI/CD tools escalate so quickly into serious incidents. The 90-day window Project Zero requires of vendors was born of similar logic: when the attacker can wait, time works against you. Here the window was hours.

One question remains that JetBrains does not answer in the bulletin: how many servers are still on old versions and how many of the attempts seen by watchTowr were completed. The company has not published figures, and the answer will come, if it comes, when some team finds an artifact it does not recognize.

José Maldonado

Author

José Maldonado

Activist and blogger on technology, free software and blockchain.

The latest
How Spanish banks are preparing for quantum risk

Keep reading