Attackers are actively exploiting a vulnerability in JetBrains TeamCity On-Premises to hijack build agents, according to a report published by BleepingComputer. The flaw, tracked as CVE-2026-136858, is described as critical in the report, and its exploitation pattern targets the part of the software delivery chain that organisations typically trust most: the systems that compile, test and release their code.
TeamCity is a continuous integration and continuous delivery (CI/CD) server widely used to automate build and deployment pipelines. A build agent is the worker component that executes those jobs — pulling source code, running compilers and test suites, and often holding credentials for registries, repositories and production targets. Control of a build agent is therefore control of the pipeline itself: an intruder able to run code on that component can inject malicious steps into otherwise legitimate releases, exfiltrate signing secrets or deployment tokens, and do so without ever touching the developer workstations that security teams monitor most closely.
According to BleepingComputer, the attacks specifically target on-premises installations of TeamCity. That detail matters for organisations that run their build infrastructure in their own data centres or private cloud rather than as a managed service; self-hosted instances are patched at the operator's discretion, which means a vulnerable deployment can remain exposed indefinitely if no one is tracking the vendor's advisories.
Why build agents matter
CI/CD systems sit in an unusual position in the enterprise threat model. They are highly privileged, frequently connected to source control and production environments, and increasingly automated — jobs run unattended, often with service accounts that hold broad permissions. A compromise of the orchestration layer yields something an ordinary web-server breach does not: the ability to tamper with the artefacts an organisation ships to its own customers.
That is why supply-chain researchers have consistently flagged build infrastructure as a high-value target. Hijacking a build agent does not require breaking into the final production system; it only requires poisoning the process that produced the release — yielding a signed-looking, ordinary-looking artefact that is difficult to detect after the fact. Defenders auditing their environment should treat CI/CD servers with the same severity as domain controllers or code-signing services.
What to do now
Teams running TeamCity On-Premises should treat this as an urgent operational item. The following checklist is offered as recommended practice while the situation develops:
- Check the vendor advisory. Confirm the current status of CVE-2026-136858 with JetBrains and identify whether a patched release is available for your installed version. Once a fixed release is published, apply it as soon as practicable.
- Restrict exposure. Limit network access to the TeamCity server and its build agents to trusted management networks. If the console is reachable from the public internet, review firewall rules and access controls immediately.
- Rotate credentials. Assume any credential reachable from an agent — repository tokens, container registry keys, cloud access keys and deployment secrets — may be compromised, and rotate them.
- Audit pipeline integrity. Review recent build histories, job configurations and agent logs for unauthorised changes, unexpected steps, or artefacts that do not match a known-good build.
- Monitor for follow-on activity. Watch for outbound connections from build agents to unfamiliar hosts and for anomalous authentication events tied to service accounts.
For IT professionals in Hong Kong and elsewhere operating self-hosted build infrastructure, the core lesson is structural: build systems deserve the same patch cadence and network segmentation as any other internet-facing production service. A CI/CD server left unpatched is not merely an administrative oversight — it is an open door to the release pipeline itself.
Source: BleepingComputer, "Critical JetBrains TeamCity flaw exploited to hijack build agents."
根據 BleepingComputer 發表的報告,攻擊者正積極利用 JetBrains TeamCity On-Premises 的一個漏洞來劫持 build agent。該漏洞編號為 CVE-2026-136858,報告中列為嚴重(critical)級別,其利用模式針對的是機構通常最為信任的軟件交付鏈環節:負責編譯、測試及發布代碼的系統。
TeamCity 是一款廣泛用於自動化 build 及 deployment pipeline 的持續整合與持續交付(CI/CD)伺服器。Build agent 是執行這些工作的工作組件——拉取代碼(source code)、執行編譯器和測試套件,而且通常持有 registry、repository 及生產環境目標的憑證。因此,控制一個 build agent 等同控制整個 pipeline:入侵者一旦能在該組件上執行代碼,便可在表面上屬合法的發布流程中注入惡意步驟、竊取簽名機密或部署令牌,而且全程無需接觸安全團隊監控最為嚴密的開發人員工作站。
據 BleepingComputer 報道,攻擊專門針對 TeamCity 的本地(on-premises)安裝版本。對於自行在自有數據中心或私有雲上運行 build 基礎設施、而非採用託管服務的機構而言,這一點至關重要:自建實例由營運方自行決定何時修補,這意味著如果沒有人跟進供應商的安全公告,存在漏洞的部署可能長期暴露於風險之中。
為何 build agent 如此重要
CI/CD 系統在企業的威脅模型中佔有特殊位置。它們擁有極高權限,經常連接源碼控制及生產環境,而且日益自動化——任務在無人值守下運行,往往由持有廣泛權限的服務帳戶執行。編排層一旦被攻破,所帶來的後果是一般 web 伺服器入侵所沒有的:竄改機構向自家客戶交付的軟件產物(artefact)的能力。
正因如此,供應鏈研究人員一直將 build 基礎設施列為高價值目標。劫持一個 build agent 並不需要攻入最終的生產系統;只需污染產生該次發布的流程即可——產出一個帶有簽名、外表看似正常的產物,事後難以偵測。負責防護的團隊在審計環境時,應以同等嚴重程度對待 CI/CD 伺服器與 domain controller 或代碼簽名(code-signing)服務。
現在應採取的措施
運行 TeamCity On-Premises 的團隊應將此事列為緊急營運事項。隨著形勢發展,以下是建議採用的檢查清單:
- 查閱供應商公告。 向 JetBrains 確認 CVE-2026-136858 的最新狀態,並查明你所安裝的版本是否有已修補的版本可用。修復版本一旦發布,應盡快套用。
- 限制暴露面。 將 TeamCity 伺服器及其 build agent 的網絡訪問限制在可信的管理網絡內。如果控制台可從公開互聯網訪問,應立即檢視防火牆規則及訪問控制。
- 更換憑證。 假設任何可從 agent 存取的憑證——repository 令牌、container registry 金鑰、雲端訪問密鑰及部署機密——均可能已外泄,並全部進行輪換(rotate)。
- 審計 pipeline 完整性。 檢查最近的 build 歷史、任務配置及 agent 日誌,留意未經授權的改動、預期以外的步驟,或與已知良好(known-good)build 不符的產物。
- 監控後續活動。 留意 build agent 向陌生主機發出的外部連接,以及與服務帳戶相關的異常驗證事件。
對於香港及其他地區運行自建 build 基礎設施的 IT 專業人士而言,核心教訓是結構性的:build 系統應與任何面向互聯網的生產服務一樣,獲得相同的修補節奏及網絡分區(segmentation)管理。一台未經修補的 CI/CD 伺服器不只是行政疏忽——它本身就是通往發布 pipeline 的一道敞開之門。
資料來源:BleepingComputer,《Critical JetBrains TeamCity flaw exploited to hijack build agents》
