CVE-2023-34225
Medium · 5.4CVSS
5.4
EPSS
60.7%
Published
May 31, 2023
CISA due date
—
Cloudanix analysis
An older TeamCity server can let a logged-in attacker plant malicious content that runs in another user's browser when they view a package feed page.
- Exploitation
- Requires User Interaction
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
This vulnerability is a stored cross-site scripting flaw in JetBrains TeamCity versions before 2023.05 affecting the NuGet feed page. An authenticated user with sufficient privileges to place or influence content rendered on the NuGet feed page can store malicious script content that later executes in another user's browser when that page is viewed. Because the script runs in the TeamCity web application origin, it may read or manipulate data accessible to the victim's session, perform actions as the victim within the limits of their permissions, and potentially capture sensitive UI-visible information or anti-CSRF tokens. The CVSS scope change reflects that browser-side execution can cross a trust boundary from attacker-controlled content into the victim's authenticated TeamCity session.
Why it matters to the business
A compromised TeamCity web interface can expose build metadata, project information, package feed details, and user-session-accessible data, and may allow unauthorized actions to be performed through a victim administrator or developer session. Since TeamCity is commonly part of software delivery pipelines, abuse of an authenticated user's browser session could create operational risk around build configuration integrity, package feed trust, and developer productivity. The EPSS score is relatively elevated, indicating meaningful likelihood of exploitation attempts despite the absence of CISA KEV listing or known ransomware use.
How an attack unfolds
An attacker first obtains low-privileged access to a vulnerable TeamCity instance or compromises an account that can add, upload, name, describe, or otherwise influence content displayed in the NuGet feed page. They then craft a malicious payload designed to be persisted by TeamCity and rendered by the NuGet feed page without proper output encoding or sanitization. When another authenticated user, such as a developer, build engineer, or administrator, visits the affected NuGet feed page, the payload executes in that user's browser under the TeamCity application origin. The attacker-controlled script can then interact with the TeamCity UI and APIs as the victim, read page-accessible information, alter settings available to the victim, or attempt to capture session-derived data. Follow-on abuse depends on the victim's privileges and the TeamCity configuration, but the most serious outcomes involve unauthorized changes to CI/CD resources or theft of sensitive build and project information visible through the web application.
How to fix it
Upgrade JetBrains TeamCity to version 2023.05 or later. Because no narrower fixed build list was provided, treat all TeamCity releases before 2023.05 as affected and prioritize a current supported TeamCity release that includes all subsequent security fixes. If immediate upgrade is not possible, restrict access to the TeamCity web interface and NuGet feed pages to trusted networks or VPN users, reduce privileges for accounts that can publish or modify NuGet feed content, review and remove suspicious package/feed metadata, and consider temporarily disabling or limiting NuGet feed functionality where operationally feasible. These mitigations reduce exposure but should not be considered a substitute for upgrading.
How to confirm the fix worked
Confirm the deployed TeamCity version is 2023.05 or later from the TeamCity administration UI, server startup logs, or installed version metadata. Review NuGet feed pages after upgrade to ensure previously stored content is safely encoded and no script executes when feed items are viewed. Security teams can also perform a controlled test in a non-production TeamCity instance by attempting to store benign HTML or JavaScript-like input in NuGet feed-rendered fields and verifying it is displayed as text rather than executed. Validate that access controls limit NuGet feed modification to expected users and that any suspicious historical feed entries or package metadata have been removed.
Typical attack path
- Identify an internet-facing or internally reachable JetBrains TeamCity server running a version before 2023.05.
- Obtain authenticated access with permissions sufficient to create or modify content reflected on the NuGet feed page.
- Submit a crafted stored XSS payload through a NuGet feed-related field or artifact metadata displayed by the vulnerable page.
- Wait for or lure a higher-privileged TeamCity user to view the affected NuGet feed page.
- Execute JavaScript in the victim's authenticated TeamCity browser session.
- Use the victim's session context to read accessible information, perform unauthorized TeamCity actions, or stage additional attacks against CI/CD workflows.
How to detect it
Investigate TeamCity application logs, web access logs, reverse proxy logs, package feed activity, and audit logs for evidence that malicious script content was stored and later viewed by privileged users. Focus on NuGet feed-related requests and package metadata changes containing HTML tags, JavaScript event handlers, encoded script payloads, or unusual URL schemes. Look for a sequence where a lower-privileged user modifies or publishes NuGet feed content, followed by an administrator or build engineer viewing the NuGet feed page, followed by unexpected TeamCity actions such as project setting changes, token creation, user or permission changes, build configuration edits, VCS root changes, or package feed modifications. Browser-executed XSS often leaves limited server-side evidence, so correlate TeamCity audit events with reverse proxy request history, unusual referrers, anomalous user-agent strings, and suspicious requests to TeamCity endpoints made under a privileged user's session shortly after viewing NuGet feed pages. If exploitation is suspected, preserve TeamCity logs, reverse proxy logs, package metadata, database/application backups where available, and relevant endpoint browser history for affected users.
- <script
- </script>
- javascript:
- onerror=
- onload=
- onclick=
- onmouseover=
- document.cookie
- localStorage
- sessionStorage
- fetch(
- XMLHttpRequest
- eval(
- atob(
- btoa(
- /app/nuget
- /httpAuth/app/nuget
- NuGet feed
What your security team should do
- Inventory all JetBrains TeamCity instances, including internal-only CI/CD servers, and identify versions older than 2023.05.
- Upgrade affected TeamCity servers to 2023.05 or a current supported release as soon as practical, with priority for internet-accessible or broadly reachable instances.
- Restrict TeamCity administrative and package-feed access to trusted networks and enforce strong authentication, including MFA where supported.
- Audit TeamCity users and roles to minimize who can publish packages, modify NuGet feed content, or administer projects.
- Review NuGet feed content, package metadata, project descriptions, and recent changes for suspicious script-like payloads.
- Search web, application, and reverse proxy logs for unusual NuGet feed page access patterns followed by sensitive administrative actions from the same victim session.
- If suspicious activity is found, rotate affected TeamCity credentials, tokens, VCS credentials, build secrets, and package publishing credentials, and review CI/CD configuration integrity.
The record
In JetBrains TeamCity before 2023.05 stored XSS in the NuGet feed page was possible
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-96379 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96382 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96368 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96361 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96362 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96360 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96357 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96358 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79