Exploits

TeamCity Flaw: Unauthenticated Agent Impersonation

Eng. Donya Bino Published  ·  7 min read

JetBrains disclosed a critical flaw in on-premises TeamCity on Wednesday, and the impact description reads like a supply chain incident in progress.

An unauthenticated attacker who can reach a TeamCity server over HTTP or HTTPS can impersonate an existing authorized build agent.

That is the whole precondition. Network reach. No account, no token, no credentials of any kind.

What Impersonation Actually Gets an Attacker

JetBrains describes three consequences, and they escalate.

Stage

What Happens

Displacement

The attacker displaces a legitimate build agent and intercepts builds assigned to it

Exposure

Credentials and other secrets passed to that agent are exposed

Tampering

Build results can be falsified and artifacts published in modified form

And then the fourth, which is the one that turns this into a supply chain problem.

Downstream builds that consume those tampered artifacts could execute attacker-supplied code.

Read the chain in order. Impersonate the agent. Take the secrets. Swap the artifact. The next pipeline stage runs it.

The Scope

All TeamCity On-Premises versions are vulnerable.

Detail

Value

CVE

CVE-2026-136858

CVSS

9.1

Affected

All TeamCity On-Premises versions

Authentication required

None

Patched in

2026.1.7, 2026.2.3, 2026.3

TeamCity Cloud

Not affected

The "all versions" scope is worth flagging. There is no version range to check, no minimum build to reason about. If you run TeamCity on-premises, you are in scope until you patch.

The Patch, and the Restart Problem

Three patched releases cover the major branches. For teams that cannot restart the TeamCity server, JetBrains published a security patch plugin.

The plugin is available for TeamCity 2021.2 or later.

That is the practical accommodation for an operational reality. A CI server restart interrupts builds, and in some organizations that requires a change window measured in days. The plugin exists so the fix does not have to wait for one.

The Reverse Proxy Mitigation

JetBrains also published a configuration-level mitigation, and it is specific.

Configure your reverse proxy to allow requests to /app/agents and its subpaths only from IP addresses where you expect legitimate build agents to originate.

The detail worth reading is the follow-on sentence. Include the outbound addresses used by cloud agents and any NAT gateways they connect through.

That instruction exists because cloud agents do not present stable addresses. They egress through shared NAT ranges that change. A naive IP allowlist will break your build pipeline the moment an agent spins up in a new subnet.

So this mitigation requires you to actually know your network topology. That is more work than it sounds, and it is also why the patch is the primary answer and this is secondary.

Exploitation Status

JetBrains says there is no evidence of active exploitation of this flaw.

That statement is accurate as of publication. It sits against a relevant piece of context from the same source.

Nearly four months ago, another critical TeamCity vulnerability was weaponized in real-world attacks, according to CISA. That one is CVE-2026-63077, rated 9.8.

Two critical flaws in the same product, months apart, one of which was actively exploited. That is the pattern to hold in mind when deciding how quickly to schedule this patch.

Who Found It

JetBrains credited security researcher Jiawei Guo for responsibly disclosing the issue on November 24, 2026.

Why This Class of Flaw Matters More Than Its Score

A 9.1 on a build server is not the same as a 9.1 on a web application.

A CI/CD system holds deployment credentials, signing keys, registry tokens, cloud provider access, and whatever secrets the pipeline needs to ship software. It also produces the artifacts that everything downstream installs.

An attacker who can impersonate a build agent is positioned at the exact point where code becomes a release. That position lets them take what the pipeline knows and change what the pipeline produces.

The "downstream builds could execute attacker-supplied code" clause in JetBrains' advisory is not a theoretical extension. It is the ordinary function of a CI pipeline. Consuming artifacts from upstream is what builds do.

What Administrators Should Do

  • Patch to 2026.1.7, 2026.2.3, or 2026.3. Match your branch and install.
  • Use the patch plugin if you cannot restart. It is available for TeamCity 2021.2 or later. Do not let a restart window delay the fix.
  • Confirm the running version after applying. A CI server that was queued for an update and then skipped during a busy release cycle is a familiar failure mode.
  • Restrict /app/agents at the reverse proxy. Allow only the addresses legitimate agents originate from, including cloud agent outbound ranges and NAT gateways. Test this before enforcing it, because a misconfigured allowlist stops every build.
  • Audit build agent connections for unrecognized sources. An impersonated agent connects to the same endpoint a real one does. The difference is the source address, which means your logs are the detection surface.
  • Review recent artifact integrity. If you have any reason to suspect compromise, compare published artifacts against what the pipeline recorded as built.
  • Rotate secrets reachable from build agents if there is evidence of impersonation. Agent-scoped credentials, deployment tokens, and signing keys are the categories the advisory names.
  • Treat TeamCity Cloud as out of scope. JetBrains says no action is required there.
  • Review the CVE-2026-63077 response if you have not already. That flaw was weaponized in the wild, and if your patching for it was partial, this is the moment to close both.

The Structural Problem With Build Infrastructure

CI/CD servers are trusted by design. They have to be, because they hold the credentials needed to deploy and the authority to produce releases.

That trust is the attack surface. Every impersonation, every stolen secret, and every tampered artifact in this chain is possible because the system is doing exactly what it was built to do.

The reverse proxy restriction JetBrains recommends is an attempt to add a boundary that the product itself does not enforce. It works, but it depends on knowing your own network, which is the part that takes effort.

FAQ

What is CVE-2026-136858?

A critical (9.1) authentication bypass in TeamCity On-Premises. An unauthenticated attacker who can reach the server over HTTP or HTTPS can impersonate an existing authorized build agent.

Does the attacker need an account?

No. No authentication and no TeamCity user account are required. Network reach to the server is the only precondition.

What can an attacker do with it?

Displace a legitimate build agent and intercept its builds, exposing credentials and secrets passed to that agent. They can also falsify build results and publish tampered artifacts, which downstream builds may then execute.

Which versions are affected?

All TeamCity On-Premises versions.

Which versions fix it?

2026.1.7, 2026.2.3, and 2026.3.

Is there a way to patch without restarting?

Yes. JetBrains published a security patch plugin for TeamCity 2021.2 or later, for teams that cannot restart the server immediately.

Is TeamCity Cloud affected?

No. JetBrains says no action is required for Cloud users.

What is the reverse proxy mitigation?

Restrict requests to /app/agents and its subpaths to the IP addresses where legitimate build agents originate, including outbound addresses used by cloud agents and any NAT gateways they connect through.

Why does the mitigation include NAT gateways?

Because cloud agents do not present stable addresses. They egress through shared, changing NAT ranges. An allowlist that omits those ranges will block legitimate builds.

Has it been exploited in the wild?

JetBrains says there is no evidence of active exploitation.

Was another TeamCity flaw exploited recently?

Yes. CVE-2026-63077, rated 9.8, was weaponized in real-world attacks according to CISA, nearly four months before this disclosure.

Who reported this flaw?

Security researcher Jiawei Guo, who disclosed it responsibly on November 24, 2026.

Why is agent impersonation a supply chain risk?

Because the agent holds the credentials the pipeline needs and produces the artifacts downstream systems install. Impersonating it means taking the secrets and controlling the output.

What should I check if I suspect compromise?

Build agent connection sources in your reverse proxy and server logs, whether any artifact differs from what the pipeline recorded as built, and whether agent-scoped secrets need rotation.

Source: The Hacker News
Professional Services

Explore Our Cybersecurity Services

Our insights are backed by hands-on service delivery. If your business needs professional cybersecurity support, our UK-based specialists are ready to help.

© 2016 – 2026 Red Secure Tech Ltd. Registered in England and Wales — Company No: 15581067