9.1

CVSS 3.1 score from JetBrains

0

TeamCity accounts an attacker needs

4

earlier TeamCity flaws on CISA's exploited list

8

days from private report to fix

Why patching TeamCity CVE-2026-136858 is only half the job

The TeamCity update closes the flaw. It cannot take back a secret that has already been handed out, and that is what this flaw is built to collect. CVE-2026-136858 does not break into the build server. It lets a stranger stand where a trusted build agent stands, and then the server does what it does all day: it sends that agent work, along with the keys the work needs.

That makes this a different kind of critical. Most build server flaws we write about end with an attacker running commands on the server. This one never needs to. The attacker asks for a job the way an agent would, receives the deployment key or the registry password that travels with it, and can send back a build result and an artifact of their own choosing. The server stores that artifact and passes it on to whatever consumes it.

JetBrains says it is not aware of any exploitation, and nothing public contradicts that today. So the urgent step is the obvious one: update, or install the security patch plugin, this week. Our argument is about what comes after. A patched server looks the same whether or not someone posed as one of its agents last week. The answer to that question is in one log file, and JetBrains has published the exact line to search for. If the line is there with a real token in it, the patch is the start of the job. The rest is rotating what those builds carried and deciding which artifacts you still trust.

What JetBrains disclosed about CVE-2026-136858

JetBrains published its advisory for CVE-2026-136858 on 2 Dec 2026. The core statement is short: an unauthenticated attacker who can reach a TeamCity server over HTTP(S) may be able to impersonate an existing authorized build agent. The attacker does not need a TeamCity user account. From there, in the advisory's words, an attacker could intercept builds, access build secrets, and tamper with build results and artifacts.

The scope is as wide as it gets for the self hosted product. JetBrains says the flaw affects all TeamCity On-Premises versions. It is fixed in 2026.1.7, 2026.2.3 and 2026.3, and there is a security patch plugin for 2021.2 and later for servers that cannot be updated yet. TeamCity Cloud customers have nothing to do: JetBrains says it has applied corrective measures there and found no evidence that any Cloud environment was exploited through this flaw.

The CVE record, which JetBrains wrote as the assigning authority, adds two details. It describes the bug as an authentication bypass during agent registration that allowed takeover of authorized build agents, and it files it under CWE-639, the class where a system trusts an identifier the caller controls. JetBrains has not published the root cause beyond that, and we will not guess at it. The record scores the flaw 9.1 under CVSS 3.1: reachable over the network, low complexity, no privileges, no user interaction, high impact on confidentiality and integrity, none on availability. Nothing falls over. Builds keep running.

On timing, the advisory says the flaw was reported privately on 24 Nov 2026. The fix and the advisory came eight days later. JetBrains states that at the time of publishing it was not aware of any active exploitation, and CISA's enrichment of the CVE record on 2 Dec marks exploitation as none.

History is the reason not to wait. CISA's Known Exploited Vulnerabilities catalog already holds four TeamCity flaws: CVE-2023-42793, CVE-2024-27198, CVE-2024-27199 and CVE-2026-63077. All four are marked as known to be used in ransomware campaigns. The newest, CVE-2026-63077, was added on 5 Aug 2026, and Help Net Security notes it reached the catalog roughly a week after disclosure. Attackers know this product, and they know what a build server is worth.

On the scale we use across the site, a TeamCity On-Premises server that the internet can reach is critical until it is patched. A server reachable only from inside the network is high: the flaw needs no account, so any foothold that can reach the server's web port will do.

CVE-2026-136858Critical
  • Product //

    JetBrains TeamCity On-Premises (Cloud already fixed)
  • Affected //

    all versions before the fixed releases
  • Fixed in //

    2026.1.7, 2026.2.3, 2026.3; patch plugin for 2021.2 and later
  • CVSS //

    9.1 (3.1, JetBrains); CWE-639
  • Accounts needed //

    none, only HTTP(S) reach to the server
  • Exploited //

    not known as of the 2 Dec 2026 advisory

What a rogue build agent can take from TeamCity

A TeamCity install has two parts. The server holds the projects, the settings and the queue. Build agents are the separate machines that do the work. JetBrains' documentation says an agent runs builds only when it is connected, authorized and enabled, and that a new agent stays unauthorized until an administrator approves it on the Agents page. That approval step is the control this flaw goes around. The attacker does not ask to be approved. They take the place of an agent that already was. The advisory's wording is that a successful attack could displace a legitimate build agent and intercept builds assigned to it.

What arrives with a build is the reason this matters. The same documentation lists what travels over the connection between an agent and the server: build settings, repository access credentials and keys, repository sources, build artifacts, build progress messages and the build log. For a pipeline that deploys, add whatever the deployment step needs. A cloud access key. A token for the package registry. A signing certificate password. A kubeconfig. Masking a password in the web interface and the log does not change what the agent receives, because the agent has to use it.

The return path is the second half. An agent reports results and publishes artifacts. An imposter can report a pass for tests that never ran, or publish a file that is not what the source would have built. JetBrains spells out the consequence: downstream builds that consume those artifacts could execute attacker supplied code. We describe what each stage achieves and leave the method out.

Figure 01

From a web request to your releases

  1. 01

    Reach //

    The server answers over HTTP(S).

  2. 02

    Pose //

    An imposter takes an approved agent's place.

  3. 03

    Receive //

    Builds arrive, with their secrets.

  4. 04

    Return //

    False results and artifacts go back.

  5. 05

    Spread //

    Downstream builds run that output.

Result //

The pipeline ships what the attacker built.

The patch removes step 02. It does nothing about what left at step 03 or what came back at step 04.

Two things decide how bad a takeover of one agent is. The first is which builds that agent is allowed to run. JetBrains' security notes tell administrators to use a separate pool of clean agents for deployment builds, and this flaw shows why: an imposter in a pool that only compiles and tests gets source code and a repository credential, while an imposter in the pool that deploys gets production. The second is how long the secrets live. A static cloud key handed to a build on Tuesday still works on Friday. A short lived token issued for one job has expired before the attacker finishes reading it.

In the 1Password breach a stolen developer token reached the pipeline. In the LiteLLM 1.107.0 compromise the release pipeline built and signed the attacker's code. Here the attacker does not need a developer at all. The pipeline trusts its workers, and the flaw let anyone claim to be one.

How to patch TeamCity: update or security patch plugin

JetBrains gives two routes, and which one you take changes what you have to track afterwards.

Update the server. Install 2026.1.7, 2026.2.3 or 2026.3, by download or through TeamCity's automatic update. This is the route JetBrains recommends for everyone, and it is the one that carries every other security fix made since your current version.

Install the security patch plugin. For servers that cannot be updated yet, the plugin covers TeamCity 2021.2 and later and installs without a server restart. From 2024.03 onward the server can download security patches itself. On 2024.03 through 2026.2.1 an administrator reviews and applies them under Available security updates on the Updates page. On 2026.2.2 and later, a server with Install automatically selected should fetch and install this patch on its own. Check that it did. If the setting is Download and notify, the patch is waiting for someone to apply it, and if it is Ignore, nothing has happened.

The plugin comes with a warning from JetBrains that deserves a second read: it addresses only CVE-2026-136858. A server on a 2023 release with the plugin installed is protected against agent takeover and still carries every other flaw fixed since. With four TeamCity flaws already on CISA's exploited list, the plugin is a way to buy days, and the update still has to follow.

It also creates a tracking problem. The CVE record lists every version before the three fixed releases as affected. A scanner that matches on version will keep flagging a plugin patched server, and sooner or later someone marks the finding as accepted. Then nobody can tell from the report which servers have the plugin and which were waved through. We made the same point about hand applied fixes in our Cacti 4HTTP2SHELL analysis. Keep a list of which servers carry the plugin, confirm it on the server's plugin page, and close the item only when the server is on a fixed release.

Then deal with reach. JetBrains adds a mitigation that is worth keeping after the patch: configure the reverse proxy, or another access control that understands paths, to allow requests to /app/agents and everything under it only from the addresses your real agents use, including the outbound addresses of cloud agents and any NAT gateways in front of them. Agents connect to the server, not the other way round, so the easy configuration accepts them from everywhere. An allowlist means the next flaw in agent handling has far fewer people who can try it.

How to check TeamCity logs for a build agent takeover

JetBrains has given defenders something most advisories do not: a specific log message tied to the attack. Search teamcity-server.log, including rotated copies, for entries containing the text of the existing agent, but different authorization token, followed by a token in quotes.

The token decides what the entry means. JetBrains says an entry with an empty token is expected and can be ignored for this check. An entry with a non-empty token may indicate an attempt to take over an existing build agent. It is an attempt at that point, not proof of success.

For each entry with a real token, the advisory sets out the follow up. Take the timestamp. Review the named agent's connection history around it and the builds assigned to that agent at the time. Check that the hostname and source address match what you expect for that agent. Then compare with the build logs, the results and the published artifacts to work out whether the attempt succeeded. An agent that suddenly connects from an address outside your agent networks, during a window that lines up with the log entry, is the pattern to look for.

How far back you can look depends on how long you keep that log. Record the date range you checked next to the result, because a clean search only clears the days the log still covers.

The rules below turn both checks into something a SIEM can run. The second needs your own address ranges in place of the example.

Figure 02

TeamCity agent takeover attempts and unexpected agent traffic

Sigma

title: TeamCity agent takeover attempt in the server log
status: experimental
description: The teamcity-server.log message JetBrains ties to CVE-2026-136858. Entries with an empty token are expected and filtered out.
logsource:
  product: teamcity
  service: server
detection:
  keywords:
    - 'of the existing agent, but different authorization token'
  filter_empty_token:
    - 'different authorization token ""'
  condition: keywords and not filter_empty_token
falsepositives:
  - None documented by JetBrains for a non-empty token; review the agent, time and source address
level: high
---
title: Request to TeamCity agent paths from outside the agent networks
status: experimental
description: Reverse proxy requests to the agent paths from addresses that are not build agents. Replace the example range with your own.
logsource:
  category: webserver
detection:
  selection:
    cs-uri-stem|startswith: '/app/agents'
  filter_known_agents:
    c-ip|cidr:
      - '10.20.30.0/24'
  condition: selection and not filter_known_agents
falsepositives:
  - New agents or cloud agent addresses not yet added to the list
level: medium
A starting point to tune against your own telemetry, not a production rule.

Which build secrets to rotate, and which artifacts to distrust

If the search finds an entry with a real token and the follow up does not rule it out, JetBrains' instructions are direct: preserve the relevant logs and build results, update or patch the server, and rotate any credentials passed to potentially affected builds. Treat artifacts from those builds as untrusted until verified, and trace where they were used or deployed.

Rotation is easier with a list made before you need it. For each build configuration that ran on the affected agent in the window, write down what it was given:

  • Repository credentials. The keys and tokens the build used to fetch source. Rotate them, and check the repository's own access log for use from addresses you do not know.
  • Deployment and cloud credentials. Access keys, service principal secrets, kubeconfigs. Rotate first, then read the cloud audit log for what those identities did after the suspect build.
  • Registry and signing material. Package registry passwords, container registry tokens, signing key passwords. A signing secret in the wrong hands turns one bad artifact into many trusted ones.
  • Everything typed as a password parameter. JetBrains' security notes say these values are masked in the interface and the build log, and also say that this often does not provide a high enough level of security, which is why they recommend a secret management tool.

Artifacts need the same care. For every artifact published by an affected build, find where it went: which downstream builds consumed it, which environments it was deployed to, which customers received it. Rebuild it from source on an agent you trust and compare. If the two differ and you cannot explain why, the deployed copy comes out.

If the search is clean, we would still rotate long lived deployment credentials on any server that was reachable from the internet before the patch, where the logs do not cover the whole period since 24 Nov. That is our judgement, not a JetBrains instruction. The cost of rotating a key is an afternoon. The cost of a key that leaked through a build you can no longer check is open ended.

This is also the moment to shorten what any future imposter could carry away. Pipelines that exchange a short lived identity token for cloud access leave very little behind for an attacker to keep. Our CI pipeline secrets and OIDC trust review walks through how to check what a pipeline can reach and how tightly that trust is scoped.

How we test CI/CD servers on an engagement

On internal and assumed breach engagements, the build server is one of the first systems we go looking for. The reason is in our first hour on an internal network walkthrough: a handful of systems hold the credentials for everything else, and CI/CD is nearly always one of them.

When we find a TeamCity server, the first questions are plain ones. Which release is it on, and if it is old, is the patch plugin really installed? Can our foothold reach its web port at all? Are the agent paths reachable from places no agent lives? Those answers alone are usually a finding, and none of them needs an exploit.

Then we look at what a single agent is trusted with. Which pools exist, which projects can run on each, and whether the builds that deploy to production share agents with builds that run code from any branch a contractor can push. We read which secrets each build configuration receives and how long they live. We prove the path the lightest way we can, in line with our cloud impact without damage guide: we show that a credential is valid and what it can reach, without deploying anything or changing a pipeline.

The report then answers one question: if a build agent were replaced tomorrow, by this flaw or the next one, what would the attacker hold by the end of the day?

Two free checks help before any engagement. Our open source recon tool, atarus-recon, builds a list of what a domain exposes, which is how you find a build server that should not be answering the internet. And where part of the pipeline runs in GitHub Actions, the GitHub Actions workflow checker flags token scope, secrets exposure and self hosted runner risks in a workflow file.

What to do today

  1. Update TeamCity On-Premises to 2026.1.7, 2026.2.3 or 2026.3. If that cannot happen today, install the security patch plugin and confirm it is active on every server.

  2. Search teamcity-server.log for the takeover message. Ignore entries with an empty token. For any other, check the agent, the time, the source address and the builds it ran.

  3. Allowlist the agent paths. Let only your agents' addresses reach /app/agents, and take the server off the internet where you can.

  4. Rotate what suspect builds carried. Repository, cloud, registry and signing secrets first, then read the audit logs for those identities.

  5. Distrust artifacts from suspect builds. Trace where they went, rebuild from source on a trusted agent, and compare.

  6. Record plugin patched servers and schedule the update. The plugin fixes this flaw only, and the version number will not show it.