One day after the disclosure, attackers were already inside. Not weeks — about 24 hours. And the target wasn't your web app, your database, or your cloud. It was your build server.

On December 2, 2026, JetBrains patched CVE-2026-136858 — a critical authentication bypass in TeamCity On-Premises, scored CVSS 9.1. Within roughly a day, threat researchers at WatchTowr started seeing live exploitation attempts on their honeypot servers. Agent registration was never required. No credentials, no phishing email, no insider access. Just HTTP requests.

What the vulnerability actually does

TeamCity's agent protocol works like this: build agents call back to the server to register and receive jobs. Agents authenticate with agent IDs and tokens. The flaw lets an unauthenticated remote attacker impersonate any existing build agent over plain HTTP or HTTPS.

That sounds like a login bypass — it is, but the blast radius is much worse than a typical auth bypass:

  1. Impersonate an agent → server assigns it real build jobs
  2. Receive build artifacts → source code, compiled binaries, deploy configs
  3. Read secrets passed to agents → API keys, cloud credentials, signing certificates — CI servers are secret concentrators
  4. Modify build outputs → inject malicious code into artifacts before they ship to production
  5. Poison the supply chain → everything downstream trusts CI output

An attacker who hijacks a build agent doesn't just steal data — they can make your CI server produce malicious builds. That code then flows into your releases, your customers' machines, and your supply chain partners.

Why agent IDs are the weak point

Exploit writers don't need to enumerate much: TeamCity agent IDs are typically sequential integers (1, 2, 3...) or easily guessable names like build-agent-01. WatchTowr's telemetry showed attackers literally sweeping ID ranges. If you have 10 agents, the whole space is trivially brute-forceable.

Who is affected

Every TeamCity On-Premises version prior to the patch. JetBrains shipped fixes in 2026.1.7, 2026.2.3, and 2026.3, plus a no-restart patch plugin that can be applied to older versions (back to 2021.2) without taking the server down.

If your TeamCity is internet-facing — directly or through a VPN-less reverse proxy — assume scanning traffic is already hitting it. CVE-2026-136858 is exactly the kind of bug that gets mass-scanned within days of a PoC dropping, and the 24-hour exploitation window proves the PoC ecosystem moves fast.

What you should do

If you haven't patched yet, this is the weekend ticket:

  • Upgrade to a fixed version, or apply the no-restart patch plugin if uptime matters
  • Check /app/agents and agent registration endpoints in your logs for unexpected activity
  • Rotate credentials stored in TeamCity parameters — treat them as potentially compromised if the server was internet-reachable

Hardening, even after patching:

  • Never expose TeamCity directly to the internet. VPN or IP allowlist on the agent endpoint
  • Firewall /app/agents to known agent IPs only — agents connect outbound anyway, so inbound rules should be strict
  • Audit agent lists: decommissioned agents shouldn't remain registered
  • Don't put production secrets in build parameters; use short-lived OIDC tokens where possible

The bigger picture

CI/CD servers are the most trusted machines in most organizations — they hold every secret and produce every release. A bug that turns them into an attacker's build farm is not a TeamCity problem, it's an industry problem. Every pipeline tool has the same architectural shape: server trusts agent callbacks, agents carry credentials, artifacts flow downstream without re-verification.

CVE-2026-136858 is a reminder that your build infrastructure is part of your attack surface. Patch it like production — because it is.

Have you checked whether your TeamCity version is affected? What CI/CD hardening do you already run? Drop it in the comments.