CVE-2026-59795: JetBrains TeamCity Stored XSS in Unauthenticated Agent Registration (CVSS 8.1)
JetBrains TeamCity versions prior to 2026.1.2 contain a stored cross-site scripting (XSS) vulnerability in the unauthenticated agent registration process. An attacker without authentication can inject malicious scripts during agent registration, which are then stored and executed in the browsers of users who interact with the affected TeamCity instance. This allows attackers to steal session tokens, perform actions on behalf of administrators, or redirect users to malicious sites.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.1 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- Weaknesses (CWE)
- CWE-79
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-10 / 2026-07-13
NVD description (verbatim)
In JetBrains TeamCity before 2026.1.2 stored XSS via unauthenticated agent registration was possible
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
A stored XSS vulnerability exists in TeamCity's agent registration endpoint, which does not require authentication. The vulnerability allows injection of arbitrary HTML and JavaScript into the agent registration parameters. These malicious inputs are stored in the TeamCity database and reflected to authenticated users viewing agent details or registration logs, enabling execution of attacker-controlled scripts in the context of the TeamCity application. The attack vector is network-based with low complexity; exploitation requires user interaction (a logged-in administrator or operator viewing the poisoned agent data).
Business impact
Compromise of TeamCity instances can severely impact CI/CD pipelines, which are critical to software delivery. An attacker exploiting this vulnerability could inject malicious code into builds, exfiltrate secrets stored in TeamCity (API keys, credentials), compromise build artifacts delivered to customers, or pivot to development infrastructure. For organizations using TeamCity to manage enterprise deployments, this creates risk of supply chain contamination and operational disruption.
Affected systems
JetBrains TeamCity versions before 2026.1.2 are affected. Organizations running any version of TeamCity on or before 2026.1.1 should assume they are vulnerable. Both on-premises and cloud-hosted TeamCity deployments are at risk. The vulnerability is accessible from the network without authentication, making it exploitable from the internet if TeamCity is exposed.
Exploitability
Exploitability is moderate to high in practical scenarios. While the vulnerability requires unauthenticated access to the agent registration endpoint and user interaction (an authenticated user must view the malicious agent registration), the agent registration process is typically accessible and routine in TeamCity environments. An attacker can craft a registration request with XSS payload and wait for administrators to inspect agents, making this a practical attack path in many deployments. No special tooling or advanced techniques are required.
Remediation
Upgrade JetBrains TeamCity to version 2026.1.2 or later. This version contains fixes that sanitize agent registration inputs and prevent stored XSS. Organizations unable to patch immediately should restrict network access to TeamCity's agent registration endpoint (typically port 8111) to trusted IP ranges, disable agent auto-registration if not required, and monitor agent registration logs for suspicious entries containing script tags or HTML entities.
Patch guidance
Apply the JetBrains TeamCity 2026.1.2 update or later as soon as feasible. Verify compatibility with your current deployment topology and test in a staging environment before production rollout. Review release notes for any breaking changes or configuration updates. JetBrains typically provides upgrade documentation and may offer migration tools for large deployments. If you operate a disconnected or airgapped TeamCity instance, obtain the patch through JetBrains' offline channels.
Detection guidance
Search TeamCity agent registration logs and database for entries containing HTML tags, JavaScript event handlers (onclick, onerror, onload), or URL-encoded script sequences (%3Cscript, %22, %27). Monitor for unusual agent names or descriptions containing special characters or encoded payloads. Implement web application firewalls (WAF) rules to block requests to the agent registration endpoint containing suspicious patterns. Log and alert on failed agent registration attempts or registrations from unexpected source IPs. Review TeamCity audit logs for users viewing agent details shortly after unusual registrations.
Why prioritize this
This vulnerability merits urgent patching due to its CVSS score of 8.1 (HIGH), the critical nature of CI/CD infrastructure, and the low barrier to exploitation. TeamCity is a foundational tool in most software development organizations, making it a high-value target. Stored XSS in this context can compromise build pipelines and software supply chain, extending impact far beyond the TeamCity instance itself. The unauthenticated attack vector and lack of exploitation complexity amplify risk.
Risk score, explained
The CVSS 3.1 score of 8.1 reflects a HIGH severity due to: (1) Network attack vector (AV:N) — exploitable remotely without special access; (2) Low attack complexity (AC:L) — no special conditions required; (3) No authentication required (PR:N) — attacker does not need credentials; (4) User interaction required (UI:R) — an authenticated user must view the malicious payload; (5) Confidentiality and integrity impact (C:H, I:H) — attacker can read sensitive data and modify application state; (6) No availability impact (A:N) — the attack does not cause denial of service. The score appropriately captures the severity for a stored XSS in a privileged application, though note that this vulnerability is not yet tracked in the CISA KEV catalog.
Frequently asked questions
Can this vulnerability be exploited if TeamCity is behind a firewall and not internet-exposed?
Yes, if an attacker has network access to the TeamCity agent registration endpoint (even from within your organization), they can inject the XSS payload. The vulnerability does not require internet exposure, but does require network reachability to the affected service. Restrict access using network segmentation, VPNs, or IP allowlists to limit attack surface.
Do I need valid TeamCity credentials to exploit this vulnerability?
No. The agent registration process is explicitly unauthenticated, allowing anyone with network access to the endpoint to submit malicious agent registrations. This is by design to facilitate agent discovery and connection, but it creates this attack surface. Upgrade to 2026.1.2 or restrict network access to the registration endpoint.
What information can an attacker steal with stored XSS in TeamCity?
An attacker's JavaScript executes in the browser context of authenticated users (typically administrators) viewing agent details. They can steal session cookies, trigger API calls on behalf of the victim, exfiltrate stored credentials or API keys visible in the UI, and redirect users to phishing sites. If the victim is an administrator, the attacker gains administrative-level access to the CI/CD pipeline.
Is there a workaround if I cannot patch immediately?
Restrict network access to the agent registration endpoint to known, trusted IP ranges using a firewall or reverse proxy. Disable automatic agent registration if your deployment does not require it. Educate users not to open suspicious agent registration requests or details. These mitigations reduce exploitability but do not eliminate the vulnerability—patching is required for full remediation.
This analysis is provided for informational purposes to support vulnerability management and risk assessment. It is based on publicly available information as of the published date and does not constitute security advice tailored to your specific environment. Always verify vulnerability details, patch availability, and compatibility against vendor advisories and your organization's change control policies before deploying updates. Test patches in non-production environments first. SEC.co makes no warranty regarding the accuracy or completeness of this analysis and assumes no liability for decisions made in reliance on it. Consult JetBrains official documentation and your security team for authoritative guidance. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-49368HIGHJetBrains YouTrack Stored XSS in Notification Templates (CVSS 8.7)
- CVE-2026-49371HIGHReflected XSS in JetBrains TeamCity Keyword Filter
- CVE-2026-59794HIGHJetBrains TeamCity Stored XSS Vulnerability on Cloud Profile Page
- CVE-2026-49375MEDIUMTeamCity Reflected XSS on Repository Download Page – Patch Guidance
- CVE-2026-49381LOWStored XSS in JetBrains TeamCity SAML Login
- CVE-2026-49384MEDIUMStored XSS in JetBrains PyCharm Jupyter Notebooks
- CVE-2026-61492LOWYouTrack Stored XSS in Digest Email Article Titles
- CVE-2016-20066HIGHWordPress CP Polls 1.0.8 Persistent XSS Vulnerability