Blog

TeamCity CVE-2026-136858: Trace Build Secrets and Artifacts

Follow a suspect TeamCity build into its credentials and downstream releases, then define recovery work and the managed agent-access boundary.

For TeamCity CVE-2026-136858, apply the vendor fix and investigate the builds an impersonated agent could have received. If a build is potentially affected, follow both what it could access and where its output went. That gives the release owner a concrete scope for credential replacement, artifact review, and deployment decisions.

A build agent is a worker that compiles, tests, or packages software. It may receive credentials and produce artifacts—files such as libraries or installable packages—that other jobs trust. For an IT manager responsible for an internal development platform, the consequential question is which applications and access permissions depend on a suspect worker's output.

What changed in TeamCity?

JetBrains disclosed the issue on December 2, 2026, following a private report on November 24. Its TeamCity security advisory describes an unauthenticated HTTP(S) attacker impersonating an authorized agent, with potential exposure of build secrets and alteration of results or artifacts. Assess on-premises installations against the fixed releases: 2026.1.7, 2026.2.3, and 2026.3. A security patch plugin is available for 2021.2 and later; it addresses this vulnerability only. TeamCity Cloud customers need no action for this issue. Guidance here was checked December 5.

Have the platform owner confirm the installed fix and preserve relevant investigation evidence. For suspected agent takeover, the advisory supplies a server-log check, distinguishing suspicious non-empty authorization tokens from expected empty-token entries. Correlate the timestamp with agent connections and assigned builds before deciding what happened. Missing logs leave an investigation gap.

Build an exposure map from one suspect job

The following is a hypothetical investigation exercise, not a customer incident. Assume an investigator identifies build 412 as potentially affected. It produced an internal library, and two later application releases consumed that exact library file. Its job also received a credential that could publish packages.

Software path: Build 412 → library artifact A → staging release 210 and production release 214.

Access path: Build 412 → package-publishing credential → permission to change the internal package repository.

These two branches lead to different work. The first follows software already distributed. The second follows access that might still be usable. Preserve the job ID, agent identity, source revision, artifact digest, consuming jobs, and deployment destinations in a restricted incident record. Record credential identifiers and permissions, never their secret values.

Start with exact artifact identities. A digest is a fingerprint of a file; it helps locate copies even when filenames differ. Ask the release owner whether staging 210 and production 214 consumed artifact A, rebuilt the library independently, or fetched a different version. A familiar version label alone leaves that question unanswered.

In this example, the deployment records confirm that both releases used A. Pause further promotion of that artifact while the incident lead and application owners assess the two existing deployments. Production needs a business-impact decision about containment or replacement, while staging can be held for investigation. Neither decision requires assuming that tampering has already been proved.

Expand the map if another job consumed A or the publishing credential could alter additional packages. Do not limit the review to the repository that originally produced the library. Conversely, retain evidence for why a separately built release falls outside the affected dependency chain instead of adding every application without a reason.

Replace access at the system that grants it

For the package-publishing branch, the credential owner should revoke the suspect credential at the repository, issue an appropriately scoped replacement, and update approved consumers. OWASP's secrets-management guidance treats revocation, replacement, and secret-use records as coordinated incident-response work. Changing a stored value in a build configuration does not revoke a credential that its destination still accepts.

Identify every pipeline using that credential before the change, coordinate any necessary interruption, and review repository activity across the suspected exposure period with the incident team. Where a job could request temporary credentials, assess their permissions, validity, and any issued sessions with the identity owner. Avoid treating one password change as a complete answer for every credential type.

After recovery, reduce shared access between unrelated pipelines. OWASP's continuous integration and delivery security guidance recommends minimum required permissions and limiting credential sharing across pipelines. For this example, a library-publishing job should not inherit unrelated production-administration access merely because both jobs use the same automation platform.

Re-establish trust before releasing replacement software

A replacement artifact needs an approved source revision, reviewed build configuration and dependencies, and a build environment the incident team accepts as trustworthy. Preserve the original evidence before cleanup. The release owner then validates the application and records which replacement reaches each destination.

Where build provenance is available, use it. Provenance records how an artifact was produced. The SLSA artifact-verification guidance calls for checking the artifact against its provenance, the trusted builder, the signature, and expected build inputs. A digest identifies bytes; deciding whether those bytes came from an acceptable process requires that additional evidence. Assess the trustworthiness of the provenance producer too; a record from a suspect builder is part of the investigation.

In the worked example, the useful recovery record links the reviewed replacement library to replacement staging and production releases, and records the old publishing credential's revocation. Software distribution and access recovery can now be tracked separately without losing their common cause.

Restrict the agent route while preserving legitimate builds

JetBrains additionally recommends restricting /app/agents and its subpaths to expected agent source addresses, including cloud-agent and network address translation (NAT) egress addresses. Treat this as an additional access restriction alongside the fix.

Network Box USA's managed Web Application Firewall service includes path-based application policy, request filtering, tuning, reporting, and traffic validation. That managed work can support a defined agent-route policy while keeping approved workers connected. Confirm the supported rule and enforcement points for the actual deployment; the service description does not establish a TeamCity-specific signature or integration.

Give the gateway operator the agent paths, expected sources, proxy layout, and required connection behavior. In an agreed test, confirm that an approved agent connects and a harmless request to the restricted path from an unauthorized source is denied. Account for changing cloud egress addresses and alternate application entry points; the WAF origin-access guide explains that separate route check.

The development and incident-response teams retain TeamCity patching, credential changes, artifact investigation, and release approval unless additional work is agreed. To review the managed application-access portion, contact our team with a high-level connection map and the build operations that must remain available. Arrange sensitive logs and release evidence through an agreed secure channel.