{
  "schemaVersion": "guard-threat-campaign/v1",
  "id": "HGTC-2026-7BED0640",
  "slug": "cve-2026-136858-teamcity-build-agent-takeover",
  "title": "TeamCity build agent registration takeover hands build secrets to anyone who can reach the server (CVE-2026-136858)",
  "aliases": [
    "CVE-2026-136858",
    "GHSA-2jpf-2fm5-p992"
  ],
  "summary": "JetBrains disclosed CVE-2026-136858 on December 2, 2026: an authentication bypass in build agent registration in TeamCity On-Premises, scored 9.1 out of 10 under CVSS v3.1 (CWE-639). A person with no TeamCity account who can reach the server over HTTP or HTTPS can impersonate an existing authorized build agent, receive the builds assigned to it, read the secrets those builds run with, and hand back falsified results and tampered artifacts. Every On-Premises version is affected; TeamCity Cloud is already fixed by JetBrains. The fix is 2026.1.7, 2026.2.3 or 2026.3, or the security patch plugin for 2021.2 and later, which installs without a restart. JetBrains also published a teamcity-server.log search that shows takeover attempts, and a reverse proxy restriction on /app/agents as the mitigation for servers that cannot patch at once.",
  "status": "published",
  "severity": "critical",
  "confidence": "high",
  "uncertainty": "JetBrains says it is not aware of any active exploitation and found no evidence any TeamCity Cloud environment was exploited; the flaw is not in CISA's Known Exploited Vulnerabilities catalog. HOL did not reproduce the flaw; the account rests on the JetBrains advisory and the CVE record.",
  "firstObservedAt": "2026-12-02T00:00:00.000Z",
  "lastObservedAt": "2026-12-03T10:10:00.000Z",
  "publishedAt": "2026-12-03T10:13:16.123Z",
  "reviewedAt": "2026-12-03T10:12:47.013Z",
  "expiresAt": "2026-12-03T10:10:00.000Z",
  "reviewer": "HOL Guard Security Publishing",
  "sources": [
    {
      "id": "jetbrains-teamcity-advisory",
      "label": "JetBrains, Critical Security Issue Affecting TeamCity On-Premises (CVE-2026-136858)",
      "url": "https://blog.jetbrains.com/teamcity/2026/12/cve-2026-136858/",
      "sourceType": "other_primary",
      "observedAt": "2026-12-02T00:00:00.000Z"
    },
    {
      "id": "cve-record-136858",
      "label": "CVE record for CVE-2026-136858 (JetBrains as CNA)",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-136858",
      "sourceType": "vulnerability_database",
      "observedAt": "2026-12-02T21:18:00.000Z"
    },
    {
      "id": "thn-teamcity-136858",
      "label": "The Hacker News, Critical JetBrains TeamCity Flaw Lets Attackers Hijack Build Agents Without Authentication",
      "url": "https://thehackernews.com/2026/12/critical-jetbrains-teamcity-flaw-lets.html",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T00:00:00.000Z"
    },
    {
      "id": "hol-blog",
      "label": "HOL Guard operator write-up",
      "url": "https://hol.org/blog/cve-2026-136858-teamcity-build-agent-takeover",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T10:04:47.000Z"
    }
  ],
  "artifacts": [
    {
      "id": "teamcity-on-premises",
      "artifactClass": "package",
      "ecosystem": "generic",
      "name": "TeamCity On-Premises",
      "version": "All versions affected; fixed in 2026.1.7, 2026.2.3, 2026.3; security patch plugin for 2021.2 and later",
      "defanged": false
    }
  ],
  "indicators": [],
  "timeline": [
    {
      "id": "researcher-private-report",
      "occurredAt": "2026-11-24T00:00:00.000Z",
      "eventType": "other",
      "summary": "Security researcher Jiawei Guo reported the flaw privately to JetBrains.",
      "sourceIds": [
        "jetbrains-teamcity-advisory"
      ]
    },
    {
      "id": "vendor-advisory-published",
      "occurredAt": "2026-12-02T00:00:00.000Z",
      "eventType": "disclosure",
      "summary": "JetBrains published its advisory for CVE-2026-136858 with the fixed versions, the security patch plugin, the reverse proxy mitigation, and the log search for takeover attempts.",
      "sourceIds": [
        "jetbrains-teamcity-advisory"
      ]
    },
    {
      "id": "cve-record-published",
      "occurredAt": "2026-12-02T21:18:00.000Z",
      "eventType": "other",
      "summary": "The CVE record for CVE-2026-136858 was published with a CVSS v3.1 score of 9.1.",
      "sourceIds": [
        "cve-record-136858"
      ]
    },
    {
      "id": "hol-blog-published",
      "occurredAt": "2026-12-03T10:04:47.000Z",
      "eventType": "other",
      "summary": "HOL Guard published the operator write-up with the scope, the log check, and the fix steps.",
      "sourceIds": [
        "hol-blog"
      ]
    }
  ],
  "coverage": [
    {
      "assertionId": "guard-evidence-pack",
      "relationship": "provides_evidence",
      "limitation": "The campaign rests on the JetBrains advisory, the CVE record, and The Hacker News reporting as carried in the HOL write-up; HOL did not reproduce the flaw."
    }
  ],
  "policies": [
    {
      "policyId": "upgrade-teamcity-fixed-releases",
      "purpose": "Upgrade TeamCity On-Premises to 2026.1.7, 2026.2.3 or 2026.3 for the line in use, or install the security patch plugin on 2021.2 and later, because the patch closes the registration bypass",
      "status": "available",
      "limitation": "Servers that cannot patch at once can restrict /app/agents and its subpaths at the reverse proxy to known agent IPs, including cloud agent outbound addresses and NAT gateways."
    }
  ],
  "limitations": [
    "TeamCity Cloud is not affected; JetBrains applied the fix itself and found no evidence of exploitation there",
    "A server no attacker can reach over HTTP or HTTPS gives the flaw no way in",
    "Servers already on 2026.1.7, 2026.2.3 or 2026.3, or carrying the security patch plugin, are covered",
    "The patch plugin covers TeamCity 2021.2 and later; older servers need the full upgrade"
  ],
  "correctionHref": "/guard/security/campaigns/cve-2026-136858-teamcity-build-agent-takeover/corrections"
}
