TeamCity CVE-2026-136858: build agent takeover, upgrade now
A critical TeamCity On-Premises flaw lets unauthenticated attackers impersonate build agents. See which versions are fixed, what to rotate and how to check.
TL;DR: JetBrains has fixed CVE-2026-136858, a critical authentication bypass in TeamCity On-Premises that lets an unauthenticated attacker take over build agents. Upgrade to 2026.3, 2026.2.3 or 2026.1.7, and treat secrets that passed through your agents as exposed if the server was reachable.
What happened
JetBrains disclosed the flaw, and The Hacker News and Help Net Security both reported it. The bug sits in how agents register with the server. A person who can reach the server without logging in can pose as an authorized agent. Help Net Security says that could let them intercept builds, read the secrets handed to agents and tamper with build results and artifacts.
NVD lists a CVSS v3.1 score of 9.1 from [email protected], and its entry was still awaiting analysis at the time of writing. The record maps the weakness to an authorization bypass through a user-controlled key. The reports we read do not say the flaw is exploited in the wild. A build server holds credentials for many other systems, so it is a worthwhile target anyway.
Am I affected?
You are affected if you run TeamCity On-Premises on a release older than the fixed ones: before 2026.3, 2026.2.3 or 2026.1.7. Which fixed line applies depends on the line you are on. Check the version in the footer of the web interface, or on the Administration page. The vendor's advisory page, linked from the NVD entry, lists the details. If your server is only reachable from a private network, the risk is lower, but an attacker inside that network is enough.
What to do now
- Upgrade the server to the fixed release for your line.
- Restrict who can reach the server, for example behind a VPN or an allow list, until the upgrade is done.
- Review the list of registered agents and remove any you do not recognise.
- Rotate tokens, keys and passwords that your builds used, starting with deployment credentials.
The last step is easier when you know which secrets sit in files rather than in a secrets manager. The leaked keys documentation explains how Stackurity reports those.
How to check with Stackurity
Stackurity does not state that it recognises TeamCity's own release, so do not rely on it to tell you whether a TeamCity server is on a vulnerable version. Check that by hand, as above. Stackurity covers Java web applications by their bundled libraries only, and it does not cover network appliance firmware. What it can help with here is the clean-up: it finds keys, tokens and passwords written in files on your servers and in repositories, without sending the secret value anywhere, and lets you assign each one an owner and a rotate-by date, then checks again after the fix.
Start a free trial of Stackurity and scan one server or repository today.