# Critical JetBrains TeamCity On-Premises Flaw (CVE-2026-136858) Lets Unauthenticated Attackers Hijack Build Agents

> JetBrains disclosed CVE-2026-136858 (CVSS 9.1), an authentication bypass during build agent registration that affects all TeamCity On-Premises versions before 2026.3, 2026.2.3 and 2026.1.7. An unauthenticated attacker with HTTP(S) access to the server can impersonate an authorized build agent, intercept its builds, access build secrets and tamper with build results and artifacts. JetBrains reports no evidence of active exploitation as of 2026-12-03.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-03T07:56:43Z
- **Last updated:** 2026-12-03T07:56:43Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7370
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7370.png
- **ID:** TL-2026-7370
- **Severity:** CRITICAL (CVSS 9.1)
- **Category:** VULNERABILITY
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 11
- **CVEs:** CVE-2026-136858, CVE-2026-63077

## Description

CVE-2026-136858 is an authentication bypass in the agent registration flow of JetBrains TeamCity On-Premises. The CVE record (CNA: JetBrains) states that the bypass 'allowed takeover of authorized build agents'. NVD scores it CVSS 3.1 9.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) and maps it to CWE-639 (Authorization Bypass Through User-Controlled Key). NVD analysis was still 'Awaiting Analysis' on 2026-12-03. The flaw was reported privately by Jiawei Guo on 2026-11-24 and disclosed by JetBrains on 2026-12-02.

Per JetBrains (as relayed by The Hacker News and other coverage), an attacker who can reach the TeamCity server over HTTP or HTTPS needs no TeamCity account to impersonate an existing authorized build agent. A rogue agent can displace the legitimate agent and receive its pending jobs. From that position the attacker can read credentials and other secrets passed to the agent, falsify build results, and publish tampered artifacts. Downstream builds that consume those artifacts can then run attacker-supplied code, which makes this a CI/CD supply-chain risk. TeamCity Cloud was remediated by JetBrains and needs no customer action; JetBrains reports no evidence of compromise there.

All TeamCity On-Premises versions are affected. Fixes ship in 2026.1.7, 2026.2.3 and 2026.3. For servers that cannot be upgraded or restarted, JetBrains provides a security patch plugin for TeamCity 2021.2 and later. The plugin addresses only this CVE and does not carry other cumulative fixes. A reverse-proxy workaround restricts /app/agents and all subpaths to the IP addresses build agents legitimately use, including cloud-agent egress and NAT gateway addresses.

Detection guidance published in secondary coverage, attributed to JetBrains, is to search teamcity-server.log for the message 'of the existing agent, but different authorization token "<token>"'. An empty token is routine connection behaviour. A non-empty token is a possible displacement attempt and should be correlated with agent connection history, source IP and hostname, active builds and job assignments, and the build logs and artifacts from that window.

No public exploit, threat actor, campaign or network IOC is documented in the sources reviewed. A Sploitus listing for the CVE contained only description text, so it is not treated as a working PoC. Technical root cause and request-level mechanics are not published by JetBrains or NVD, and some secondary sites add unverified details (forged headers, default ports) that are excluded here. For context, the same product's earlier CVE-2026-63077 (CVSS 9.8, unauthenticated RCE via the agent polling protocol, added to CISA KEV on 2026-08-05) is a distinct vulnerability on the same /app/agents attack surface and was exploited in the wild. Its indicators are recorded below and labelled as related context only, because they have not been shown to apply to CVE-2026-136858.

## MITRE ATT&CK

- T1190 Exploit Public-Facing Application
- T1195 Supply Chain Compromise
- T1036 Masquerading
- T1550 Use Alternate Authentication Material
- T1552 Unsecured Credentials
- T1565 Data Manipulation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**TeamCity Agent Authorization Token Mismatch (CVE-2026-136858) - Exploitation** (`TL-2026-7370-SPL-001`)

Detects the JetBrains-published hunting indicator for CVE-2026-136858 in teamcity-server.log: the message 'of the existing agent, but different authorization token' carrying a NON-empty token. An empty token is routine reconnect behaviour; a non-empty token indicates a possible build agent displacement/impersonation attempt via the agent registration authentication bypass (CVSS 9.1, CWE-639). Token values are never emitted in results. Escalates when several distinct tokens or repeated mismatches hit the same server.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1550, T1036
- **Data sources:** teamcity-server.log (index=teamcity, sourcetype=teamcity:server), TeamCityServer_CL (Sentinel custom log)
- **Severity:** high
- **Confidence:** high

### Splunk SPL

````spl
index=teamcity sourcetype="teamcity:server" source="*teamcity-server.log" earliest=-24h "of the existing agent, but different authorization token"
| rex field=_raw "different authorization token \x22(?<auth_token>[^\x22]*)\x22"
``` Empty token is routine reconnect behaviour; non-empty token is a possible agent displacement attempt ```
| where len(auth_token) > 0
| stats count AS mismatch_events dc(auth_token) AS distinct_tokens earliest(_time) AS first_seen latest(_time) AS last_seen BY host source
| convert ctime(first_seen) ctime(last_seen)
| eval cve="CVE-2026-136858", mitre="T1190,T1550,T1036", severity=if(distinct_tokens>1 OR mismatch_events>=3, "critical", "high")
| table first_seen last_seen host source mismatch_events distinct_tokens severity cve mitre
````

### Microsoft KQL

```kql
TeamCityServer_CL
| where TimeGenerated > ago(24h)
| where RawData has "of the existing agent, but different authorization token"
| extend AuthToken = extract(@'different authorization token "([^"]*)"', 1, RawData)
| where isnotempty(AuthToken)
| summarize MismatchEvents = count(), DistinctTokens = dcount(AuthToken), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by Computer
| extend Severity = iff(DistinctTokens > 1 or MismatchEvents >= 3, "critical", "high")
| project FirstSeen, LastSeen, Computer, MismatchEvents, DistinctTokens, Severity
```

### Sigma

```yaml
title: TeamCity Build Agent Authorization Token Mismatch CVE-2026-136858
id: 7c1e5a2e-3b9d-4f6a-9d0e-1a2b3c4d5e01
status: experimental
description: Detects the JetBrains-published indicator for CVE-2026-136858 in teamcity-server.log, an existing agent connecting with a different and non-empty authorization token, which signals possible build agent impersonation.
references:
  - https://nvd.nist.gov/vuln/detail/cve-2026-136858
  - https://thehackernews.com/2026/12/critical-jetbrains-teamcity-flaw-lets.html
author: Threadlinqs Team
date: 2026-12-03
tags:
  - attack.initial-access
  - attack.t1190
  - attack.defense-evasion
  - attack.t1550
  - attack.t1036
  - cve.2026-136858
logsource:
  product: teamcity
  service: server
detection:
  selection:
    Message|contains: 'of the existing agent, but different authorization token'
  selection_nonempty:
    Message|re: 'different authorization token "[^"]+"'
  condition: selection and selection_nonempty
fields:
  - Computer
  - Message
falsepositives:
  - Legitimate agent re-registration after a token reset or agent reinstall on the same host
  - Cloned agent images that reuse an agent name
level: high

```

**Known false positives:**

- Legitimate agent re-registration after an agent reinstall, token reset or restored VM snapshot
- Cloned or auto-scaled agent images that reuse an agent name

**Tuning notes:** The index, sourcetype and Sentinel table are deployment-specific names for teamcity-server.log ingestion; map them to your forwarder. Verify the exact log message text against a sample after upgrade. Exclude known agent hostnames once a mismatch is confirmed benign. Correlate each hit with agent connection history, source IP/hostname, active builds, and build logs/artifacts from the same window, and rotate secrets exposed to the agent if a rogue agent is confirmed.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- TeamCity Agent Registration POST From Non-Approved Source (locked: unlock with TL Creds)
- Scripted HTTP Client Impersonating TeamCity Build Agent on [indicator] (locked: unlock with TL Creds)
- TeamCity Agent Commands Error Endpoint Probing (Related CVE-2026-63077 Surface) (locked: unlock with TL Creds)
- Unexpected .jspws File Created Under TeamCity Web Root (Related CVE-2026-63077) (locked: unlock with TL Creds)
- Shell Spawned By TeamCity Server Process - Post-Exploitation (locked: unlock with TL Creds)
- Build Agent Process Harvesting Secrets and Credential Files - Supply Chain (locked: unlock with TL Creds)
- TeamCity Token Mismatch Followed by Build and Artifact Activity - Post-Exploitation (locked: unlock with TL Creds)
- TeamCity [indicator] Access From Non-Approved Source - Agent Surface Probing (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Critical JetBrains TeamCity Flaw Lets Attackers Hijack Build Agents Without Authentication](https://thehackernews.com/2026/12/critical-jetbrains-teamcity-flaw-lets.html)
- [NVD - CVE-2026-136858](https://nvd.nist.gov/vuln/detail/cve-2026-136858)
- [TeamCity Build Agent Impersonation: Patches and Log Checks](https://www.gadget-rumours.com/teamcity-agent-impersonation-cve-2026-136858/)
- [CVE-2026-136858: TeamCity Agent Bypass, Fix Status (Brandefense)](https://brandefense.io/knowledge-hub/vulnerabilities/cve-2026-136858/)
- [JetBrains Dec 2026 Fixes 12 Flaws, Bypass CVE-2026-136858 (SecurityOnline)](https://securityonline.info/jetbrains-security-vulnerabilities-cve-2026-136858/)
- [Related: Rapid7 - Unauthenticated RCE in JetBrains TeamCity (CVE-2026-63077) agent polling protocol analysis](https://rapid7.com/blog/post/ra-unauthenticated-rce-in-jetbrains-teamcity-cve-2026-63077)
- [Related: CISA flags TeamCity CVE-2026-63077 RCE as exploited (KEV added 2026-08-05)](https://thehackernews.com/2026/08/cisa-flags-teamcity-cve-2026-63077-rce.html)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7370
