ペンリジェント・ヘッダー

CVE-2026-136858: Investigate TeamCity Agent Identity and Build Lineage

CVE-2026-136858 is an authentication bypass in TeamCity On-Prem agent registration. A remote unauthenticated attacker who can reach the server over HTTP(S) may impersonate an existing build agent. Because agent identity controls which builds run and which job inputs they can access, investigate the identity event and the work assigned to it as one incident scope. JetBrains says all TeamCity On-Prem versions are affected. Its fixed releases are 2026.1.7, 2026.2.3, and 2026.3. JetBrains advisory

WatchTowr reported that its Attacker Eye honeypot observed exploitation attempts on December 3, 2026. That is evidence of attempts against a research honeypot, not proof of a customer compromise or a measure of broad exploitation. JetBrains’ initial statement that it had not observed exploitation described the situation at disclosure time; it does not contradict a later honeypot observation. WatchTowr research

Start with the signal, then test it against agent history

Four-step verification flow from the TeamCity server log signal through token-field review, agent connection history, and hostname/source-address comparison.

JetBrains points investigators to teamcity-server.log entries containing the phrase:

of the existing agent, but different authorization token

For this specific check, the vendor says entries with an empty token can be disregarded; a non-empty token warrants investigation. The line is a lead, not a verdict. Preserve the original log in an access-controlled location and redact the token from incident tickets or shared notes. Then compare the event with TeamCity’s agent connection history, the expected agent hostname, and the source IP. A change in address can have an innocent explanation such as a documented NAT or infrastructure change, so verify the expected egress path before treating it as hostile. JetBrains advisory

The evidence ledger below turns those vendor checks into a repeatable incident workflow. It is an editorial response method, not an official JetBrains severity scale or a Penligent lab finding.

Evidence stageRecord and compareDecision it supports
Identity signalEvent time, existing agent ID, whether the logged token field is empty or non-empty; keep the raw value restrictedDecide whether the vendor’s log lead needs follow-up; do not label compromise from this field alone
Agent sessionConnection-history entry, expected hostname, source address, known NAT or agent-pool changesEstablish whether the existing agent identity appeared from an unexplained origin
Build executionBuild IDs assigned to that agent around the event, build results and logsDetermine whether the suspicious session executed work or altered a result
Materials and outputsSecrets available to those builds, artifacts they produced, and downstream jobs or releases that consumed themScope credential rotation and artifact containment to actual exposure and consumption paths

Keep the four stages linked by timestamps and stable IDs. A log anomaly with no matching unexpected session is different evidence from an unexpected session that received builds. Likewise, a build that had no access to a sensitive secret does not justify claiming that secret was stolen. This distinction helps responders avoid both under-scoping and indiscriminate rotation.

Scope the build impact before closing the incident

Once a session needs investigation, map the affected agent to the builds it received during the relevant window. Use TeamCity build history, results, and artifacts to identify what ran and what it produced. For each build, record which credentials or secrets the job could actually access, whether the job completed, and whether its output was consumed by another pipeline, package repository, or deployment.

If evidence shows that a build ran through an unexplained agent session, treat its outputs as untrusted until they are validated or rebuilt from a known-good state. Trace consumers of those outputs rather than stopping at the original build. Revoke or rotate credentials that were available to the affected work and could have been exposed; confirm revocation and update dependent jobs. This is a scoped incident-response recommendation derived from the documented attack path, not a claim that every build secret is automatically disclosed.

The incident record should keep source evidence separate from conclusions. Store the event time, agent ID, hostname and source-address comparison, affected build IDs, secrets in scope, artifact hashes or repository references, downstream consumers, containment owner, and unresolved questions. Avoid copying raw authorization tokens into broad-access tickets.

Patch the server and restrict agent registration traffic

An agent session leads to assigned builds, produced artifacts, and downstream consumers; a separate branch identifies secrets available to the job.

JetBrains lists these fixed TeamCity On-Prem releases:

Release lineFixed release
2026.12026.1.7
2026.22026.2.3
2026.32026.3

JetBrains also provides a Security Patch plugin for versions 2021.2 and later and says this patch does not require a server restart. The vendor’s automatic security-patch option applies to 2026.2.2 and later. Check the official advisory for current availability and installation instructions. If your instance is older than 2021.2, do not assume the plugin supports it; use the vendor’s supported upgrade or mitigation guidance. TeamCity Cloud is not the affected deployment named in this On-Prem advisory. JetBrains advisory

As a compensating control, JetBrains recommends restricting access to the /app/agents path through a reverse proxy or path-based access rule so only authorized agent networks can reach it. This control reduces exposure but is not a substitute for applying the fix. Account for agents behind NAT or shared egress gateways, and validate that the rule still permits legitimate agent connections before enforcing it.

Close against evidence, not an assumption

A three-stage incident assessment: inspect the agent identity signal, correlate its session, and scope the builds and outputs.

A useful closure record answers four questions: Was the server patched through a supported route? Was the unusual agent identity explained or contained? Which builds actually ran through the relevant session? Were the secrets and outputs from those builds either cleared, revoked, validated, or rebuilt, including downstream uses?

If the log line exists but the session and build evidence are unavailable, record the impact as unresolved and preserve that uncertainty. Do not turn missing logs into proof that no work ran. Conversely, do not report a confirmed compromise solely because a non-empty token appeared in the vendor’s search string.

This review used JetBrains’ advisory and WatchTowr’s dated honeypot report. No TeamCity instance was tested, no exploit was run, and no customer incident data was examined. The evidence-led workflow is a reasoned operational synthesis; it should be adapted to the organization’s logging retention, identity model, and build architecture.

The accompanying Penligent 3.0 video is a general product workflow demonstration. It is not evidence that CVE-2026-136858 was reproduced, detected, or remediated.

AI assisted drafting, diagram production, and source comparison. Material vulnerability facts were checked against the vendor advisory and the dated original research report.

Start Your First Authorized Test

記事を共有する
関連記事
jaJapanese