# JetBrains TeamCity On-Premises authentication bypass during agent registration (CVE-2026-136858)

Detection pack 1.0.0 (2 Dec 2026). HubSpot Files slot: `teamcity-cve-2026-136858-pack-v1`.

Official JetBrains advisory (blog post timestamp 2026-12-02T17:32:21+01:00, which is 16:32 GMT / 16:32 Europe/London) describes a CVSS v3.1 9.1 Critical authentication bypass during agent registration in TeamCity On-Premises, assigned CVE-2026-136858. All TeamCity On-Premises versions are affected. TeamCity Cloud has already been patched; Cloud customers need take no action.

Official JetBrains and CVE.org score: CVSS v3.1 9.1 Critical (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`, CWE-639). There is no official CVSS v4.0 score. Only call this issue Critical next to that 9.1 figure.

Fixed releases: upgrade to TeamCity 2026.1.7, 2026.2.3, or 2026.3 (or later). Official CVE.org affected encoding is version 0, lessThan `2026.3, 2026.2.3, 2026.1.7` (versionType semver), defaultStatus unaffected. The official JetBrains releases service lists those three versions, all dated 2026-12-02, with builds 223148 (2026.1.7), 239430 (2026.2.3), and 268273 (2026.3).

If a full upgrade is not possible, JetBrains has released a security patch plugin for TeamCity 2021.2 and later. The plugin can be installed without restarting the TeamCity server and addresses only CVE-2026-136858. The official manual download is `https://download.jetbrains.com/teamcity/plugins/internal/CVE-2026-136858-patch.zip` (file name `CVE-2026-136858-patch.zip`). The plugin identifier inside the zip is UNVERIFIED. Starting with TeamCity 2024.03, administrators can use Administration | Updates: on 2024.03 through 2026.2.1, review and apply pending patches under Available security updates; on 2026.2.2 and later, Security patches can be set to Install automatically (or review downloads if set to Download and notify). The version checkers inspect the product version only; plugin status must be verified separately when the version is not a listed fixed release.

- no exploitation reported by JetBrains as of 2 Dec 2026; not listed in CISA KEV as of 2 Dec 2026 (catalogue 2026.11.30).
- KEV due dates bind US federal agencies only (BOD 26-04). Patch now regardless.
- The KQL in this pack has NOT been run against a live tenant.

Research is credited to security researchers only.

## What happened

An unauthenticated attacker who can reach a TeamCity On-Premises server over HTTP(S) can impersonate an existing authorized build agent, intercept builds, access build secrets, and tamper with build results and artifacts. No TeamCity user account is required. Downstream builds that consume tampered artifacts could execute attacker-supplied code.

## Official log check (JetBrains)

Search `teamcity-server.log` for entries containing:

`of the existing agent, but different authorization token "<token>"`

In the official advisory HTML, `<token>` is a placeholder. A non-empty token may indicate an attempt to take over an existing build agent. Entries with an empty token (`""`) are expected and can be disregarded for this check. If a non-empty token is found, use its timestamp to review that agent's connection history, hostname, and source IP, and compare with build logs, results, and published artifacts. Do not circulate the token as an IOC.

Official documentation stores server logs as plain text under `<TeamCity Server Home>/logs`. `teamcity-server.log` is documented as the general server log. Default filesystem locations for `<TeamCity Server Home>` are UNVERIFIED. The pack checkers accept an operator-supplied `--log` path whose file name is `teamcity-server.log`, report only counts, and redact any matched token as `(redacted)`.

## Official additional mitigation

Configure a reverse proxy or other path-aware access control to allow requests to `/app/agents` and its subpaths only from IP addresses where legitimate build agents are expected to originate, including cloud-agent egress and NAT gateways. Limit server access to trusted networks; if remote users or agents must connect, use a VPN or other network access controls. Keep the server and build agents on separate hosts.

## Same-release notes (not additional 9.0+ TeamCity issues)

Official release notes for 2026.1.7, 2026.2.3, and 2026.3 also list a task to address CVE-2026-114938 in TeamCity Java runtimes, plus a count of security problems fixed (eight, 16, and 93 respectively) and a note that security bulletins are typically published a few days after the release date. The JetBrains issues-fixed page, as fetched on 2 Dec 2026, lists CVE-2026-136858 as the TeamCity product CVE resolved in 2026.3, 2026.2.3, and 2026.1.7. Do not present CVE-2026-114938 as a TeamCity issue with an official 9.0 or higher score in this pack; it is named only as a Java-runtime task in these notes.

## NVD and KEV

NVD vulnStatus is Awaiting Analysis as of the 2 Dec 2026 fetch. NVD published 2026-12-02T22:18:30.427 (22:18 GMT / 22:18 Europe/London). CVE.org published 2026-12-02T21:18:46.066Z (21:18 GMT / 21:18 Europe/London). CNA is JetBrains (assignerShortName JetBrains). NVD lists the official JetBrains CVSS v3.1 9.1 vector as type Secondary (source cve@jetbrains.com). The numeric score and vector match the official CVE.org / JetBrains figure; do not treat the Secondary label as a different score.

Live CISA KEV catalogue 2026.11.30, dateReleased 2026-11-30T19:44:39.2733Z (19:44 UTC / 19:44 GMT / 19:44 Europe/London), 1810 entries. CVE-2026-136858 is not listed.

## Version format and checker

Official version strings include both older `YYYY.MM` / `YYYY.MM.P` forms (for example 2024.03, 2024.03.3, 2025.07, 2025.11) and `YYYY.M` / `YYYY.M.P` forms (for example 2021.2, 2026.1.6, 2026.1.7, 2026.2.3, 2026.3). The checkers treat 2026.3 and 2026.3.0 as the same fixed release. Verdicts: 2026.1.7 or later on the 2026.1 train, 2026.2.3 or later on the 2026.2 train, and 2026.3 or later are FIXED. Earlier versions, including 2026.1, 2026.2, 2025.11, 2024.03, and 2021.2, are AFFECTED on version alone. The official plugin may still remediate this CVE on 2021.2 or later; confirm plugin status separately. Unparseable or IPv4-like values are REVIEW.

### Checker usage

```
scripts/check-teamcity-cve-2026-136858.sh --version 2026.1.6
scripts/Check-TeamCityCve2026136858.ps1 --version 2026.3
scripts/check-teamcity-cve-2026-136858.sh --version-file version.txt
scripts/check-teamcity-cve-2026-136858.sh --csv inventory.csv
scripts/check-teamcity-cve-2026-136858.sh --log /path/to/teamcity-server.log
```

CSV header must be `host,version`. The worst row wins (AFFECTED, then REVIEW, then FIXED). `--log` may be used alone or with a version input. The log file name must be `teamcity-server.log`. Tokens are never printed.

| Exit | Meaning |
| --- | --- |
| 0 | FIXED (or log-only with no non-empty token) |
| 2 | AFFECTED (or log-only with a non-empty token) |
| 3 | REVIEW |
| 5 | usage or read error |

## Hunting

`kql/teamcity-cve-2026-136858-hunting.kql` and `sigma/` are labelled OUR PATTERN. The official JetBrains log string and the `/app/agents` path are called out as official. Replace host labels with your TeamCity On-Premises hosts. Hits are not proof of exploitation.

## Official sources

- https://blog.jetbrains.com/teamcity/2026/12/cve-2026-136858/
- https://www.jetbrains.com/privacy-security/issues-fixed/
- https://www.cve.org/CVERecord?id=CVE-2026-136858
- https://nvd.nist.gov/vuln/detail/CVE-2026-136858
- https://download.jetbrains.com/teamcity/plugins/internal/CVE-2026-136858-patch.zip
- https://www.jetbrains.com/help/teamcity/teamcity-server-logs.html
- https://www.jetbrains.com/help/teamcity/2026.3/teamcity-2026-3-release-notes.html
- https://www.jetbrains.com/help/teamcity/2026.2/teamcity-2026-2-3-release-notes.html
- https://www.jetbrains.com/help/teamcity/2026.1/teamcity-2026-1-7-release-notes.html
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk

## Manual checks (no payloads)

1. Inventory TeamCity On-Premises servers and record the product version.
2. Upgrade to 2026.1.7, 2026.2.3, or 2026.3, or install the official security patch plugin on 2021.2 or later if a full upgrade cannot be done immediately.
3. On 2024.03 through 2026.2.1, review Available security updates. On 2026.2.2 and later, consider Install automatically for security patches.
4. Limit reachability of the server, and restrict `/app/agents` to expected agent addresses.
5. Search `teamcity-server.log` for the official stem and review only non-empty tokens. Preserve logs and build results if a non-empty token is found, rotate credentials passed to potentially affected builds, and treat those artifacts as untrusted until verified.
6. Keep the server and build agents on separate hosts.

## Unverified

- Default filesystem path for `<TeamCity Server Home>`
- Registry keys
- Plugin identifier inside `CVE-2026-136858-patch.zip`
- Rotated log file names other than `teamcity-server.log`
- Exact DeviceTvmSoftwareInventory SoftwareName and SoftwareVendor strings
- TeamCity server and agent process names
- Service ports
- Sentinel or syslog field layout for `teamcity-server.log` lines
- Exact remaining URI layout under `/app/agents`
- Whether every security problem counted in the 2 Dec 2026 release notes already has a public TeamCity CVE row

## Differences from the original flag

- The official advisory HTML uses the placeholder `of the existing agent, but different authorization token "<token>"`. The flag rendered that as a quoted space. This pack uses the official HTML string and treats `<token>` as a placeholder.
- Official plugin file name and download URL (`CVE-2026-136858-patch.zip`) are stated on the advisory; the plugin identifier inside the zip is not.
- CVE.org lists only the issues-fixed page as a reference, not the blog advisory. Both are official JetBrains sources. Official CVSS is v3.1 9.1 only (no v4.0).
- NVD labels the official JetBrains 9.1 vector as Secondary. The score matches official CVE.org; there is no second numeric score.
- Official release notes for the three fixed builds also mention CVE-2026-114938 in TeamCity Java runtimes and a count of other security problems, with bulletins typically a few days later. Issues-fixed currently lists CVE-2026-136858 as the TeamCity product CVE resolved in those three versions.
- Version format includes both `YYYY.MM` (2024.03, 2025.11) and `YYYY.M.P` (2026.1.7, 2026.3). The flag listed the fixed trains correctly.
- NVD vulnStatus is Awaiting Analysis (the flag did not state NVD status). Publish times match the flag (21:18 GMT on CVE.org, 22:18 GMT on NVD). KEV catalogue 2026.11.30, 1810 entries, ID not listed.
- The flag quoted "not aware of any active exploitation". This pack uses the required wording: no exploitation reported by JetBrains as of 2 Dec 2026.

## Notes for the web page

1. Official score is JetBrains / CVE.org CVSS v3.1 9.1 Critical (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`). Only call Critical next to that 9.1 figure. No official v4.0 score.
2. Affected: all TeamCity On-Premises versions. Fixed: 2026.1.7, 2026.2.3, or 2026.3 (or later). TeamCity Cloud is already patched.
3. Credit security researchers only. Name no reporter, firm, team or programme.
4. Official log check: search `teamcity-server.log` for `of the existing agent, but different authorization token "<token>"`. Treat `<token>` as a placeholder. Non-empty tokens may indicate an attempt; empty `""` can be disregarded. Do not publish tokens.
5. Official plugin for 2021.2 or later, no server restart, fixes only this CVE. Official file: `CVE-2026-136858-patch.zip`. Plugin ID inside the zip is UNVERIFIED. Version checkers cannot see plugin status.
6. Official additional mitigation: restrict `/app/agents` and subpaths to expected agent IPs, including cloud egress and NAT gateways.
7. NVD vulnStatus is Awaiting Analysis as of 2 Dec 2026 22:18 GMT / 22:18 Europe/London. CVE.org published at 21:18 GMT / 21:18 Europe/London. NVD Secondary 9.1 matches the official vector; it is not a different score.
8. Use the required caveats, including CISA KEV catalogue 2026.11.30 (dateReleased 2026-11-30T19:44:39.2733Z, 19:44 GMT / 19:44 Europe/London, 1810 entries; CVE-2026-136858 not listed) and that the KQL has not been run against a live tenant.
9. Release notes for the three fixed builds also mention CVE-2026-114938 in Java runtimes and a count of other security problems. Do not present those as additional TeamCity issues with an official 9.0 or higher score. Issues-fixed lists CVE-2026-136858 as the TeamCity product CVE in 2026.3, 2026.2.3, and 2026.1.7.
10. Pack slot is `teamcity-cve-2026-136858-pack-v1`. No LinkedIn post unless Oliver asks.
