JetBrains has issued an urgent security advisory detailing a critical vulnerability in TeamCity On-Premises that allows unauthenticated remote attackers to impersonate legitimate build agents over HTTP or HTTPS. Cataloged as CVE-2026-136858, the flaw permits an adversary to displace an authorized build agent, intercept active build jobs, exfiltrate sensitive secrets, and tamper with compiled output and software artifacts.
Don’t miss: How Software Testing Services Help Deliver
The vulnerability impacts all on-premises versions of TeamCity. JetBrains has rolled out official updates in releases 2026.1.7, 2026.2.3, and 2026.3, alongside a dedicated standalone plugin to protect older installations down to version 2021.2. While JetBrains confirmed that its managed TeamCity Cloud platform has already been secured and shows no evidence of exploitation, on-premises administrators are urged to apply immediate updates or mitigations to prevent software supply chain compromises.
Unauthenticated Impersonation Risks Across CI/CD Pipelines
The fundamental threat posed by CVE-2026-136858 lies in how build agents communicate with the central TeamCity server. Under normal circumstances, an authorized build agent authenticates itself to the server, polls for build tasks, receives environment variables and credentials required to compile source code, and uploads resulting binary artifacts.
Because this vulnerability requires no existing user credentials, any attacker capable of establishing network contact with an exposed TeamCity server via HTTP(S) can masquerade as an already-authorized agent. By exploiting the flaw, an adversary effectively displaces a legitimate build runner. Once the rogue agent takes control of the pipeline slot, the TeamCity server begins routing pending build jobs to it.
This architecture takeover presents three distinct attack vectors:
* Credential and Secret Theft: Environment variables, signing certificates, API tokens, deployment passwords, and repository keys dispatched to the displaced agent can be harvested by the attacker.
* Falsification of Build Telemetry: Attackers can report false build outcomes, bypassing automated verification stages.
* Tampering with Build Artifacts: A malicious agent can inject untrusted code, backdoors, or malicious logic directly into compiled packages, libraries, or binaries before uploading them back to the TeamCity artifact repository.
When downstream build configurations or automated release pipelines pull those compromised artifacts for deployment, they inadvertently execute attacker-supplied instructions, establishing a direct supply-chain breach.
Discovery, Timeline, and Affected Platforms
According to the advisory published by JetBrains author Daniel Gallo, security researcher Jiawei Guo discovered the vulnerability and reported it privately to JetBrains on November 24, 2026. The issue was disclosed in accordance with the vendor’s coordinated disclosure policy.
Every version of TeamCity On-Premises is affected out of the box unless patched. In contrast, TeamCity Cloud environments have already received internal remediations. JetBrains stated that it investigated its hosted service and discovered no evidence that any TeamCity Cloud environment was accessed or compromised through this vector. Customers using TeamCity Cloud do not need to take manual action.
At the time the advisory was published, JetBrains stated it had not observed any active public exploitation of CVE-2026-136858 in the wild. However, because Continuous Integration servers are high-value targets for enterprise network intrusion, administrators are warned to patch immediately before proof-of-concept exploits circulate.
Patching Paths Across TeamCity Deployments
Administrators managing self-hosted TeamCity environments have two primary paths to secure their infrastructure: upgrading to a fully patched server release or installing an out-of-band security plugin.
Full Release Upgrades
JetBrains recommends upgrading directly to one of the newly released server maintenance lines:
* TeamCity 2026.1.7
* TeamCity 2026.2.3
* TeamCity 2026.3
Upgrades can be performed by downloading the corresponding installation files manually or through the built-in automatic update features in the administrative console. Updating the platform ensures protection not only against CVE-2026-136858 but also against other cumulative security patches provided in recent builds.
Standalone Security Patch Plugin
For teams unable to undertake a full platform upgrade due to change windows, dependencies, or internal validation policies, JetBrains released a standalone security patch plugin compatible with TeamCity 2021.2 and later.
A significant operational advantage of the security patch plugin is that it can be loaded directly through the TeamCity web interface without requiring a restart of the underlying server process. However, JetBrains cautions that this plugin exclusively mitigates CVE-2026-136858 and does not supply other cumulative platform enhancements.
Automated and managed patching behavior depends on the version currently deployed:
* TeamCity 2024.03 through 2026.2.1: Administrators can navigate to Administration | Updates and review pending updates under the Available security updates view to manually trigger installation.
* TeamCity 2026.2.2 and Later: These versions introduce granular automation settings under Security patches. If configured to Install automatically, the server independently downloads and applies verified compatible security patches as they emerge. If set to Download and notify, administrators must review and approve downloaded packages on the Updates page. If set to Ignore, all automated mechanisms are bypassed, requiring manual review.
* Legacy Supported Versions (Back to 2021.2): Administrators must download the security patch plugin manually and upload it through the standard TeamCity plugin management interface.
Log Auditing and Signs of Potential Exploitation
Organizations must determine whether unauthorized actors attempted agent displacement prior to the deployment of patches. JetBrains provided clear log auditing criteria allowing security teams to inspect their server records for takeover indicators.
Administrators should search their central teamcity-server.log files for the following text pattern:
of the existing agent, but different authorization token "<token>"
When evaluating matching lines, the presence of characters within the quotation marks is crucial:
* Empty Token (""): Matches displaying an empty token string represent expected, routine agent connection behavior and can be disregarded.
* Non-Empty Token: An entry displaying a non-empty token string inside the quotes signals a potential attempt by an external party or conflicting process to displace an authorized build agent.
Incident Investigation Workflow
If a non-empty token entry is discovered, administrators should immediately execute the following review steps:
1. Isolate the Timestamp: Note the exact time of the logged attempt.
2. Review Agent Activity: Cross-reference the timestamp with the targeted agent’s historical connection logs, active builds, and job assignments.
3. Verify Host Network Identity: Confirm whether the inbound IP address and hostname associated with the connection match the known internal specifications of the legitimate agent machine.
4. Inspect Generated Artifacts: Examine build logs, execution outputs, and compiled binary artifacts generated during that operational window for discrepancies or unexpected payload injections.
5. Rotate Pipeline Secrets: If unauthorized activity is confirmed, capture and preserve logs for forensic analysis, patch the host, and immediately rotate all API keys, access credentials, and certificates exposed to affected build runs.
6. Quarantine Artifacts: Mark all artifacts generated by suspicious builds as untrusted, and audit downstream distribution networks to identify whether those packages reached production clusters.
Reverse Proxy and Network Hardening Controls
In addition to software patching, JetBrains outlines practical defense-in-depth measures to restrict the attack surface exposed by build agent endpoints.
Administrators are advised to configure upstream reverse proxies, web application firewalls (WAFs), or path-aware access lists to enforce strict IP filtering on agent endpoints. Specifically, network ingress to the URI path:
/app/agents
and any of its subpaths should be strictly restricted. Only trusted source IP addresses belonging to legitimate build agents should be permitted to query this endpoint. Network teams must account for dynamic environments by whitelisting:
* Dedicated IP addresses assigned to physical or static virtual build agents.
* Dynamic outbound public and private addresses allocated to auto-scaling cloud agents.
* Network Address Translation (NAT) gateways through which distributed agent pools route their outbound traffic to the primary server.
General infrastructure best practices should also be applied: isolate the primary TeamCity server from public internet exposure by placing it behind a VPN or internal corporate gateway, run build agents on dedicated host machines physically or logically separated from the central server, and maintain strict version currency across all build runner pools.
Frequently Asked Questions
Does CVE-2026-136858 require valid credentials to exploit?
No. The vulnerability can be exploited by an unauthenticated attacker. Anyone who can communicate with the TeamCity server over HTTP or HTTPS can execute the attack without having a TeamCity user account.
Are TeamCity Cloud instances affected by this vulnerability?
While the underlying vulnerability affected all TeamCity deployments, JetBrains has already patched its TeamCity Cloud environments. Cloud customers do not need to take administrative action, and JetBrains reported no evidence of compromise across its hosted platform.
Can I patch TeamCity without restarting the server?
Yes. Installing the dedicated security patch plugin for TeamCity versions 2021.2 and later secures the server against CVE-2026-136858 without requiring a service restart. Full upgrades to versions 2026.1.7, 2026.2.3, or 2026.3 follow standard upgrade procedures.
Source: The JetBrains Blog





Leave a Reply