Automated Threat Modeling

JetBrains TeamCity CVE-2026-49373: Brief Summary of Argument Injection RCE via Perforce Connection Settings

A brief summary of CVE-2026-49373, a high-severity argument injection vulnerability in JetBrains TeamCity that enables remote code execution through malicious Perforce VCS root connection settings.

CVE Analysis

7 min read

ZeroPath CVE Analysis
ZeroPath CVE Analysis

2026-05-29

JetBrains TeamCity CVE-2026-49373: Brief Summary of Argument Injection RCE via Perforce Connection Settings
Experimental AI-Generated Content

This CVE analysis is an experimental publication that is completely AI-generated. The content may contain errors or inaccuracies and is subject to change as more information becomes available. We are continuously refining our process.

If you have feedback, questions, or notice any errors, please reach out to us.

[email protected]

Introduction

An argument injection flaw in JetBrains TeamCity's Perforce VCS integration lets authenticated users run arbitrary code on the build server by crafting malicious connection settings. Many organizations run their CI/CD pipelines on TeamCity. For them, this vulnerability (CVSS 7.1) is a direct path from a compromised or malicious developer account to full control over build infrastructure, source code, and deployment credentials.

This vulnerability was disclosed on 2026-05-29 alongside at least 10 other TeamCity CVEs, several of them rated High severity. A batch that size points to a broad security audit of the platform. It also continues a pattern set by an earlier Perforce integration flaw, CVE-2025-68164, which enabled port enumeration through the same connection test functionality. The new CVE raises the impact from information disclosure to full remote code execution.

Technical Information

Root Cause: CWE-88 Argument Injection

CVE-2026-49373 is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command. MITRE defines this weakness as a case where "the argument of a function that invokes a command processor" is not properly sanitized, which lets an attacker "modify command line arguments" and potentially "execute arbitrary commands or read and modify data anywhere on the system." CWE-88 is a child of CWE-77 (Command Injection). In this narrower variant, the attacker manipulates the arguments passed to an existing command invocation instead of injecting an entirely new command.

The Perforce Integration Attack Surface

TeamCity supports Perforce (Helix Core) as a VCS root type. When a user configures a Perforce VCS root, TeamCity collects connection parameters: the Perforce server address (P4PORT), username, password, workspace (client) name, and other settings. TeamCity ultimately passes these parameters to the Perforce command-line client (p4) when it checks out source code during builds.

The vulnerability exists because the Perforce connection settings fields were not properly sanitized for argument delimiter characters. When a connection parameter value contains special delimiter characters (such as spaces, quotes, or shell metacharacters), the command processor reads them as separate arguments instead of as part of a single parameter value. An attacker can use this to inject additional, attacker-controlled arguments into the p4 command invocation.

Exploitation Flow

The likely exploitation path has three steps:

  1. An authenticated user with permissions to create or modify VCS root configurations in TeamCity crafts a malicious Perforce connection setting value that contains argument delimiters.
  2. When TeamCity executes a build that references this VCS root, it passes the unsanitized value as part of the p4 command-line invocation.
  3. The injected arguments change how the p4 command behaves, so the attacker can execute arbitrary code on the TeamCity server with the privileges of the TeamCity server process.

The authentication requirement matches TeamCity's permission model for VCS root configuration, but it does little to reduce the risk in practice. Compromised developer credentials, overly permissive role assignments, or insider threats can all provide the necessary access.

Escalation from CVE-2025-68164

A related vulnerability, CVE-2025-68164, was disclosed earlier and fixed in TeamCity 2025.11. It allowed port enumeration through the Perforce connection test functionality. A Low-severity information disclosure followed by a High-severity RCE in the same subsystem makes the case for thorough security remediation of VCS connection modules.

AttributeCVE-2025-68164CVE-2026-49373
DescriptionPort enumeration via Perforce connection testRCE via Perforce connection settings
SeverityLowHigh (CVSS 7.1)
CWENot specifiedCWE-88
Fix Version2025.112026.1
Attack TypeInformation DisclosureRemote Code Execution

Supply Chain Implications

TeamCity orchestrates build and deployment pipelines, so an attacker with RCE on the server can:

  • inject malicious code into build artifacts destined for production
  • exfiltrate source code and secrets stored in build configurations
  • move laterally using deployment credentials managed by the CI/CD system
  • tamper with build logs to conceal evidence of compromise

Affected Systems and Versions

All versions of JetBrains TeamCity prior to 2026.1 that use Perforce VCS root configurations are affected. TeamCity 2026.1 includes the fix.

For organizations that cannot upgrade immediately, JetBrains provides a security patch plugin compatible with TeamCity versions 2017.1 and later.

CVE-2026-49373 was one of several TeamCity vulnerabilities in a coordinated disclosure:

CVE IDSeverityFix Version
CVE-2026-49373High (CVSS 7.1)2026.1
CVE-2026-44413High2026.1, 2025.11.5
CVE-2026-49372High2026.1, 2025.11.5
CVE-2026-49374High2026.1
CVE-2026-49371High2026.1.1
CVE-2026-49375Medium2026.1, 2025.11.5
CVE-2026-49376Medium2026.1
CVE-2026-49377Medium2025.11.2
CVE-2026-49378Medium2026.1
CVE-2026-49379Medium2026.1
CVE-2026-49380Low2026.1
CVE-2026-49381Low2026.1

Upgrading to TeamCity 2026.1 fixes all listed CVEs except CVE-2026-49371, which requires version 2026.1.1.

Vendor Security History

JetBrains has a documented record of security findings in TeamCity. Its VCS integration modules, for both Git and Perforce, have been a recurring source of vulnerabilities, including path traversal, credential leakage, and now argument injection.

The company self-reports vulnerabilities through [email protected], which points to a responsible disclosure posture. JetBrains also ships backward-compatible security patch plugins for older versions, so customers who cannot upgrade right away still receive critical fixes. In March 2026, JetBrains published a detailed blog post on the security risks of CI/CD plugin architectures, which shows the company is aware of the wider threats facing build infrastructure.

Still, this batch alone includes at least five High-severity CVEs disclosed at once. That volume suggests the platform's attack surface remains substantial and warrants continuous scrutiny from security teams.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization