Threat intel4 min read
TeamCity flaw lets outsiders hijack build agents without logging in
CVE-2026-136858 (CVSS 9.1) lets an unauthenticated attacker impersonate a trusted TeamCity build agent, steal build secrets and tamper with artifacts. All on-premises versions are affected; update to 2026.1.7, 2026.2.3 or 2026.3.
4Tify Team

JetBrains has fixed a critical flaw in TeamCity On-Premises that lets an attacker with no account take the place of a build agent the server already trusts. The bug is tracked as CVE-2026-136858 and rated 9.1 on the CVSS scale. Every on-premises version is affected, and the fixed releases are 2026.1.7, 2026.2.3 and 2026.3.
What happened
JetBrains published its advisory on December 2, 2026, eight days after the issue was reported to it privately. The flaw sits in the way the server registers build agents. NVD describes it as an authentication bypass during agent registration that allows "takeover of authorized build agents" (CWE-639, authorization bypass through a user-controlled key).
The attacker needs network access to the TeamCity server over HTTP or HTTPS. No login, no TeamCity user account and no help from a user are required.
JetBrains says it was not aware of any exploitation when it published. CVE-2026-136858 is not in CISA's Known Exploited Vulnerabilities catalog as of December 3. CISA's own assessment marks it as automatable, with total technical impact.
Who is affected
- All TeamCity On-Premises versions before 2026.1.7, 2026.2.3 and 2026.3.
- TeamCity Cloud customers have nothing to do. JetBrains fixed the cloud service and found no sign that any Cloud environment was exploited.
How the attack works
A build agent is the machine that runs your pipeline steps. The server hands it jobs together with whatever those jobs need: repository credentials, deployment keys, cloud tokens, signing keys.
With this bug, an outsider can present itself as one of your existing agents and push the real one aside. From there, JetBrains lists what the attacker gets:
- the builds assigned to that agent, and the secrets passed to them;
- the ability to report fake build results;
- the ability to publish tampered artifacts.
The last point reaches furthest. Any later build or deployment that consumes those artifacts could run code the attacker supplied, so a single hijacked agent can spread into production releases.
TeamCity servers have been a target before. CISA added CVE-2026-63077, an unauthenticated TeamCity flaw rated 9.8, to its exploited list on August 5, 2026, and two older TeamCity authentication bypasses from 2023 and 2024 are on the same list.
What to do now
- Update the server to 2026.1.7, 2026.2.3 or 2026.3. The download links and full instructions are in JetBrains' advisory.
- If you can't update yet, install the security patch plugin. It covers TeamCity 2021.2 and later and goes in without restarting the server. From version 2024.03, look under Administration > Updates for pending security patches. On 2026.2.2 and later, set Security patches to "Install automatically" so future fixes arrive on their own.
- Restrict the agent endpoint. In your reverse proxy, allow
/app/agentsand its subpaths only from the IP addresses your agents actually use, including cloud agents and the NAT gateways they leave through. - Check for takeover attempts. Search
teamcity-server.logfor lines containingof the existing agent, but different authorization token. An empty token ("") is normal. A non-empty one may be an attempt: compare that agent's hostname and source IP with what you expect, and review the builds it ran around that time. - If anything looks wrong, keep the logs, patch the server and rotate every credential passed to the affected builds. Treat artifacts from those builds as untrusted until checked, and find out where they were deployed.
Longer term, a CI server rarely needs to face the open internet. Keep it behind a VPN or an allow list, and run the server and agents on separate hosts.
A TeamCity login page that answers from the internet is easy to forget about. Our Attack Surface Management service keeps an inventory of what your organisation exposes online, including CI/CD servers like this one, and flags it when an exposed system runs a version with a known flaw. The full record for the bug is on NVD.
