This module exploits an authentication bypass vulnerability in JetBrains TeamCity. An unauthenticated attacker can leverage this to access the REST API and create a new administrator access token. This token can be used to upload a plugin which contains a Metasploit payload, allowing the attacker to achieve unauthenticated RCE on the target TeamCity server. On older versions of TeamCity, access tokens do not exist so the exploit will instead create a new administrator account before uploading a plugin. Older version of TeamCity have a debug endpoint (/app/rest/debug/process) that allows for arbitrary commands to be executed, however recent version of TeamCity no longer ship this endpoint, hence why a plugin is leveraged for code execution instead, as this is supported on all versions tested.
Exploit database
Vulnerability
CVE-2024-27199
Vulnerability details
- Score
- 7.3
- Severity
- high
CVSS 3.1 · JetBrains
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:LDescription
In JetBrains TeamCity before 2023.11.4 path traversal allowing to perform limited admin actions was possible
CVE ProgramExploit source choices
8 sourcesJetBrains TeamCity Unauthenticated Remote Code Execution
2024-03-04jetbrains_teamcity_rce_cve_2024_27198.rb
aneasystone/github-trending
使用 Github Actions 跟踪 Github 趋势项目。
2022-08-0955 files · 213 stars
w01fh4cker/cve-2024-27198-rce
CVE-2024-27198 & CVE-2024-27199 Authentication Bypass --> RCE in JetBrains TeamCity Pre-2023.11.4
2024-03-062 files · 153 stars
yoryio/cve-2024-27198
Exploit for CVE-2024-27198 - TeamCity Server
2024-03-052 files · 37 stars
stuub/rcity-cve-2024-27198
CVE-2024-27198 & CVE-2024-27199 PoC - RCE, Admin Account Creation, Enum Users, Server Information
2024-04-222 files · 35 stars
chebuya/cve-2024-30851-jasmin-ransomware-path-traversal-poc
Jasmin ransomware web panel path traversal PoC
2024-04-042 files · 21 stars
passwa11/cve-2024-27198-rce
passwa11/cve-2024-27198-rce source repository
2024-03-082 files · 3 stars
charondefalt/cve-2024-27198-rce
charondefalt/cve-2024-27198-rce source repository
2024-03-092 files · 1 stars