Your CI/CD server holds nearly every secret a software project has: deployment keys, registry tokens, app signing certificates. An attacker who gets in there no longer needs to break each application one by one. The newly disclosed TeamCity vulnerability CVE-2026-136858 makes exactly that possible, and it needs no account.

What happened to TeamCity On-Premises

JetBrains disclosed the flaw on December 2, 2026. According to The Hacker News on December 3, it is an authentication bypass with a CVSS score of 9.1. An attacker who can reach the TeamCity server over HTTP(S) can impersonate an authorized build agent.

JetBrains describes the impact clearly: the attacker can intercept builds, read secrets passed to the agent, falsify build results or publish tampered artifacts. Downstream pipelines that consume those artifacts may end up running the attacker's code.

Every TeamCity On-Premises version is affected. The fixes are in 2026.1.7, 2026.2.3 and 2026.3. TeamCity Cloud has already been handled by JetBrains, so Cloud customers need to do nothing.

Exploitation attempts have already started

JetBrains initially said it saw no exploitation in the wild. watchTowr then reported attempts starting December 3. In their account, the only prerequisite is guessing the ID of an active agent, and since IDs start at 1 and count up, that barrier is close to nonexistent. Two HTTP requests are enough to take over an agent's role.

In short, do not wait for next month's maintenance window. Any server exposed to the internet, or to networks outside your trusted perimeter, comes first.

Why this is worse than an ordinary server bug

A build agent is the machine that compiles, tests and deploys. Those jobs are often handed cloud access keys, database passwords or tokens for pushing packages to a registry. Taking over the agent means taking those too.

The supply-chain angle is more worrying still. A tampered artifact flows into later build steps and then into production. It is the same family of risk as the repository malware cases we have covered, such as PolinRider hidden in GitHub repos and the 1Password GitHub account breach (both in Vietnamese).

Check and patch in one morning

If your team, or a vendor you hire, runs a self-hosted TeamCity, work through this list:

  1. Find the running version on TeamCity's Administration page. Anything older than 2026.1.7, 2026.2.3 or 2026.3 needs action.
  2. Upgrade to one of the three fixed versions. If you cannot restart the server yet, install the security patch plugin from JetBrains, which works with TeamCity 2021.2 and later.
  3. Restrict the agent registration path at the reverse proxy (see below).
  4. Review reverse proxy access logs for requests to /app/agents from unfamiliar addresses, especially since December 2.
  5. If anything looks suspicious, rotate every secret those builds have used, then re-verify the artifacts published in that window.

Allow only your agents' addresses on /app/agents

JetBrains advises configuring the reverse proxy so that /app/agents and its subpaths accept requests only from the IP addresses legitimate agents use, including the outbound addresses of cloud agents and any NAT gateways. An Nginx example (replace the addresses with your real ranges):

location /app/agents {
    allow 203.0.113.10;   # agent at the office/datacenter
    allow 198.51.100.0/24; # outbound range of cloud agents
    deny  all;

    proxy_pass http://teamcity_upstream;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Reload with nginx -t && systemctl reload nginx, then call the path from a machine outside the list. A 403 is the correct result. Also confirm your real agents still connect, because blocking the wrong range will stall your builds.

This is a mitigation, not a substitute for the patch. Proxy setups differ, so compare it with JetBrains' own guidance before applying it.

Limiting the damage next time

Even if you do not use TeamCity, this is a good prompt to review a few things in your own CI/CD:

  • Do not expose the CI server directly to the internet. Put it behind a VPN or an IP allowlist.
  • Scope build secrets narrowly and give them short lifetimes, so one hijacked agent does not take the whole infrastructure with it.
  • Verify artifacts (checksums, signatures) before later steps consume them.
  • Automation workflows need the same discipline, as in our post on checking GitHub Actions workflows that use pull_request_target (in Vietnamese).

If you outsource building and running your software, ask your vendor two concrete questions: which version is the build system on, and who gets the alert when it has a vulnerability. For a new project, you can browse the projects Besoft has delivered to get a sense of how we work, then talk to us about reviewing your build and deployment pipeline from day one.

References