CVE-2024-27199

JetBrains TeamCity Relative Path Traversal (CVE-2024-27199)

Detects exploitation of CVE-2024-27199, a relative path traversal vulnerability in JetBrains TeamCity on-premises. Unauthenticated attackers can traverse directory paths in the TeamCity web server to access restricted endpoints and files outside the intended web root, potentially leading to information disclosure or authentication bypass chained with CVE-2024-27198.

Vulnerability Intelligence

KEV — Known Exploited

What is CVE-2024-27199 JetBrains TeamCity Relative Path Traversal (CVE-2024-27199)?

JetBrains TeamCity Relative Path Traversal (CVE-2024-27199) (CVE-2024-27199) maps to the Initial Access and Defense Evasion and Credential Access tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for JetBrains TeamCity Relative Path Traversal (CVE-2024-27199), covering the data sources and telemetry it touches: W3CIISLog, CommonSecurityLog, AzureDiagnostics. The queries below are rated high severity at high confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Defense Evasion Credential Access
Microsoft Sentinel / Defender
kusto
union isfuzzy=true
(
  AzureDiagnostics
  | where Category == "ApplicationGatewayAccessLog"
  | where requestUri_s matches regex @"(?i)/res/[^?]*(?:%2e%2e|\.\.)[^?]*/(?:admin|config|WEB-INF)"
  | project TimeGenerated, requestUri_s, clientIP_s, httpStatus_d, host_s, userAgent_s
),
(
  W3CIISLog
  | where csUriStem matches regex @"(?i)(?:/res/|/update/|/icons/)(?:[^/]*(?:%2e%2e|\.\.)[^/]*/)+"
  | project TimeGenerated, csUriStem, cIP, scStatus, csHost, csUserAgent
),
(
  CommonSecurityLog
  | where DeviceVendor in ("F5", "Palo Alto Networks", "Fortinet", "Cisco")
  | where RequestURL matches regex @"(?i)(?:/res/|/update/).*(?:%2e%2e|%252e%252e|\.\.).*(?:/admin|/config|WEB-INF|server\.xml)"
  | project TimeGenerated, RequestURL, SourceIP, EventOutcome, DestinationHostName, RequestClientApplication
)
| where TimeGenerated > ago(24h)
| extend DecodedPath = replace_string(replace_string(coalesce(requestUri_s, csUriStem, RequestURL), "%2e", "."), "%252e", ".")
| where DecodedPath matches regex @"(?i)(?:\.\./){1,}(?:admin|WEB-INF|conf|config|internal)"
| summarize RequestCount=count(), UniqueEndpoints=dcount(coalesce(requestUri_s, csUriStem, RequestURL)) by SourceIP=coalesce(clientIP_s, cIP, SourceIP), bin(TimeGenerated, 5m)
| where RequestCount >= 3
| extend RiskScore = case(RequestCount >= 20, "Critical", RequestCount >= 10, "High", "Medium")
| project TimeGenerated, SourceIP, RequestCount, UniqueEndpoints, RiskScore

Detects HTTP requests to JetBrains TeamCity containing path traversal sequences targeting restricted paths. Monitors IIS logs, WAF logs, and Azure Application Gateway logs for encoded and double-encoded dot-dot sequences in TeamCity URL patterns.

high severity high confidence

Data Sources

W3CIISLog CommonSecurityLog AzureDiagnostics

Required Tables

W3CIISLog CommonSecurityLog AzureDiagnostics

False Positives

  • Security scanners (Qualys, Nessus, Rapid7 InsightVM) performing authenticated web application scans
  • Penetration testers performing authorized assessments against TeamCity instances
  • Broken link crawlers or SEO tools that may follow malformed URLs
  • Misconfigured reverse proxies that rewrite or corrupt path segments before forwarding

Sigma rule & cross-platform mapping

The detection logic for JetBrains TeamCity Relative Path Traversal (CVE-2024-27199) (CVE-2024-27199) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  product: azure

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1TeamCity Path Traversal to WEB-INF via Encoded Dots

    Expected signal: HTTP GET request to /res/..%2f..%2f..%2fWEB-INF/web.xml logged in web server access logs with the attacker's IP. Response code 200 if vulnerable, 400/404 if patched or blocked.

  2. Test 2TeamCity Path Traversal via Double-Encoded Sequences

    Expected signal: HTTP request containing %252f in URL path to TeamCity /update/ endpoint visible in web access logs.

  3. Test 3Automated Traversal Scan Simulation (Multiple Paths)

    Expected signal: Five HTTP GET requests from the same source IP to /res/ URL paths containing %2f traversal sequences within a 10-second window, visible in web server access logs.

  4. Test 4Chain CVE-2024-27199 with Admin Configuration Read

    Expected signal: HTTP GET to /icons/ endpoint with traversal sequence targeting conf/database.properties. HTTP 200 response body containing JDBC connection string indicates successful exploitation.

Unlock Pro Content

Get the full detection package for CVE-2024-27199 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections