The TeamCity vulnerability CVE-2026-136858 is a critical flaw affecting all TeamCity On-Premises versions, and JetBrains recommends updating to 2026.1.7, 2026.2.3 or 2026.3. According to JetBrains, the attacker does not need authentication but must be able to reach the server over HTTP(S).

Quick summary

  • CVE-2026-136858 affects all TeamCity On-Premises versions.
  • TeamCity Cloud: customers do not need to do anything.
  • The vulnerability may allow an attacker without an account to impersonate an authorized build agent.
  • The fix is included in 2026.1.7, 2026.2.3 and 2026.3.
  • Those who cannot upgrade yet can install the security patch plugin for TeamCity 2021.2 or later.

How does the TeamCity vulnerability CVE-2026-136858 work?

An attacker can impersonate an existing build agent when the TeamCity server is reachable over HTTP(S). According to JetBrains, the attacker does not need a TeamCity account.

Sequence diagram of an attacker impersonating a build agent of the TeamCity server
An attacker can impersonate a build agent to intercept builds and falsify results.

Once the impersonation succeeds, the legitimate build agent may be replaced and builds assigned to it may be intercepted. This may expose credentials and other secrets passed to the agent.

The attacker may also falsify build results or publish tampered artifacts (build products). Downstream builds that use those artifacts may run code supplied by the attacker.

JetBrains said that at the time of the announcement, it was not aware of any real-world exploitation.

How to patch and mitigate

The main fix is to update the server to one of the three fixed versions. You can download the new release or use TeamCity’s automatic update option.

If you cannot upgrade yet, JetBrains provides a security patch plugin for TeamCity 2021.2 or later, which can be installed without restarting the server. The plugin only addresses this vulnerability, so JetBrains always recommends updating the server to the latest version.

Since TeamCity 2024.03, the server can download available security patches by itself. Go to Administration | Updates and follow the steps for your version.

With TeamCity 2026.2.2 or later, the Security patches section has an Install automatically option to download and install verified patches. JetBrains recommends enabling this setting so you receive future security patches as soon as they are available.

Additional measure at the reverse proxy

JetBrains suggests configuring the reverse proxy or path-based access control to allow requests to /app/agents and its subpaths only from IPs used by legitimate agents. The list should include the outbound addresses of cloud agents and the NAT gateways they go through.

How to check whether your server was exploited

Search teamcity-server.log for lines containing the following text:

of the existing agent, but different authorization token "<token>"

This text is used to detect signs of agent takeover. A non-empty token may indicate an attempted agent takeover, while an empty token (“”) is normal and can be ignored.

If you see a line with a non-empty token, use the timestamp to review the agent’s connection history and the builds assigned to it. Check whether the hostname and source IP match the expected agent, then compare against build logs, build results and published artifacts.

Impact on developers

Every team that runs TeamCity On-Premises itself should treat this as something to handle soon. The following points are our cautious recommendations, based on JetBrains’ announcement.

  1. Identify the TeamCity version you are running and upgrade to 2026.1.7, 2026.2.3 or 2026.3, or install the security patch plugin if you cannot upgrade yet.
  2. Review teamcity-server.log for the string above.
  3. If you suspect exploitation, save the logs, update or patch the server, and rotate the credentials passed to the affected builds.
  4. Treat artifacts from those builds as untrusted until verified, and trace where they were used or deployed.

In the long term, JetBrains advises restricting server access to a trusted network, using a VPN or network access control when external connections are needed, and running the server and build agents on separate machines.

Impact assessment

Audience Impact Severity What to do
Developers Secrets in builds and artifacts may be tampered with. High Check logs and rotate credentials of suspicious builds.
BrSE / PM Artifacts delivered to customers may need to be re-verified. Medium Ask the infrastructure team about the version and log review results.
Managers All On-Premises installations are affected, so an update schedule must be decided. High Prioritize updating or patching; from 2026.2.2 you can enable automatic installation of security patches.

Industry perspective

From Toratech Blog’s perspective, CI/CD systems are valuable targets because they hold secrets and produce artifacts that go into products. The notable risk is that tampered artifacts can spread to downstream builds, but the opportunity is that automatic update mechanisms shorten patching time.

In the short term, teams should check versions and logs. In the long term, separating the server from agents and restricting network access are practices worth considering.

For Vietnam–Japan offshore projects using TeamCity On-Premises, the BrSE may need to have information about the version, check results and related artifacts ready to discuss with the customer when asked.

Frequently asked questions

Is TeamCity Cloud affected?

TeamCity Cloud users do not need to do anything. JetBrains said it has applied remediation and has seen no evidence that any Cloud environment was exploited through this vulnerability.

Which versions does the patch plugin support?

The security patch plugin is for TeamCity 2021.2 or later. The plugin only addresses CVE-2026-136858, and JetBrains still recommends updating the server.

Has the vulnerability been exploited?

At the time of the announcement, JetBrains said it was not aware of any real-world exploitation. You should still check your server logs.

References

This article was compiled with the help of AI from the sources below.