← Vulnerability feed

Vulnerability record · CVE-2024-31138 · published 28 March 2024

CVE-2024-31138: JetBrains TeamCity stored XSS via Agent Distribution settings

Jetbrains · Teamcity

JetBrains TeamCity before 2024.03 is vulnerable to cross-site scripting through the Agent Distribution settings. An authenticated user with low privileges can inject script that executes in the context of other users who view the affected settings. Because the vulnerable component is a build management server, successful exploitation can compromise sessions of users with broader access.

5.4 CVSS 3.1 Medium EPSS 75% · top 0.5% CWE-79 · Cross-site scripting
5.4CVSS 3.1 base score
75%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
2References
17 Jun 2026Last modified by NVD

Description

In JetBrains TeamCity before 2024.03 xSS was possible via Agent Distribution settings

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: medium.

medium priorityRequires authentication and user interaction, but the scope change and high EPSS percentile raise the risk of session compromise in TeamCity environments.

What it is

JetBrains TeamCity before 2024.03 is vulnerable to cross-site scripting through the Agent Distribution settings. An authenticated user with low privileges can inject script that executes in the context of other users who view the affected settings. Because the vulnerable component is a build management server, successful exploitation can compromise sessions of users with broader access.

Impact

An attacker can execute arbitrary script in a victim's browser session, potentially stealing session tokens or performing actions as the victim. The CVSS scope change (S:C) indicates impact can extend beyond the vulnerable component to other TeamCity users.

Attack surface

Reached over the network through the TeamCity web interface; the vector requires low privileges (PR:L) and user interaction (UI:R), meaning an authenticated attacker must place the payload and a victim must view the affected Agent Distribution settings.

Exploitation

Not listed in CISA KEV and no public exploit references are provided; EPSS is high at 0.745 (99.5th percentile), suggesting elevated likelihood of exploitation activity, but the record does not confirm active exploitation.

What to do

  • Upgrade TeamCity to 2024.03 or later, which contains the fix.
  • Restrict access to Agent Distribution settings to trusted administrators only.
  • Enforce least privilege so low-privileged accounts cannot modify agent distribution configuration.
  • Apply output encoding and input validation on any custom settings pages if upgrading is delayed.
  • Monitor TeamCity audit logs for unexpected changes to agent distribution settings.

Detection

  • Review TeamCity audit logs for modifications to Agent Distribution settings by unexpected accounts.
  • Search web server and proxy logs for script payloads in requests to agent distribution configuration endpoints.
  • Monitor for anomalous authenticated sessions or token reuse following visits to agent settings pages.
  • Alert on new or modified agent distribution entries containing HTML or script tags.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2024-31138 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2026-63077JetBrains TeamCity unauthenticated RCE via agent polling deserializationJetBrains TeamCity before 2026.1.3 and 2025.11.7 deserializes untrusted data received through the agent polling protocol, allowing unauthenticated re…KEVEPSS 9.8%analysed9.8CVE-2024-27198JetBrains TeamCity authentication bypass allows admin actionsJetBrains TeamCity before 2023.11.4 contains an authentication bypass via an alternate path (CWE-288), letting an unauthenticated attacker reach func…KEVEPSS 100%analysed9.8CVE-2023-42793JetBrains TeamCity authentication bypass leads to remote code executionJetBrains TeamCity before 2023.05.4 contains an authentication bypass via an alternate path, classified as CWE-288 and CWE-306, that allows an unauth…KEVEPSS 100%analysed7.3CVE-2024-27199JetBrains TeamCity path traversal enables limited admin actionsJetBrains TeamCity before 2023.11.4 is vulnerable to relative path traversal that lets an unauthenticated remote party perform limited administrative…KEVEPSS 100%analysed10.0CVE-2026-65906Jetbrains teamcity code injection vulnerabilityIn JetBrains TeamCity before 2026.1.2, 2025.11.6 сode execution via Kotlin DSL sandbox escape was possibleEPSS 0.66%9.8CVE-2025-54530Jetbrains teamcity incorrect default permissions vulnerabilityIn JetBrains TeamCity before 2025.07 privilege escalation was possible due to incorrect directory permissionsEPSS 0.18%9.8CVE-2025-46433Jetbrains teamcity relative path traversal vulnerabilityIn JetBrains TeamCity before 2025.03.1 improper path validation in loggingPreset parameter was possibleEPSS 0.55%9.8CVE-2024-41827Jetbrains teamcity insufficient session expiration vulnerabilityIn JetBrains TeamCity before 2024.07 access tokens could continue working after deletion or expirationEPSS 0.40%

Source: NIST National Vulnerability Database (record CVE-2024-31138), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.