TeamCity path confusion auth bypass
CVE-2024-27198 is an authentication bypass in JetBrains TeamCity before 2023.11.4: a crafted URL with a JSP path parameter confuses the auth filter and lets an unauthenticated caller reach the REST API with full control, including creating administrator accounts. CVSS 9.8 and CISA KEV listed.
How to reach it
Run the challenge locally with its docker-compose. The flagger sidecar writes your per-run flag to /flag/flag.txt, which the entrypoint stores as a server parameter on the root project, readable over the REST API once you hold admin credentials. TeamCity listens on port 8080; first boot takes a couple of minutes.
Run this challenge
Spin it up locally with Docker. The flagger sidecar fetches a per-run flag into a shared volume, then the challenge container boots and reads it.
services:
flagger:
image: matejbasic/rootcause-flagger:1.0
environment:
ROOTCAUSE_API_URL: https://root-cause-api.matejbasic.com
ROOTCAUSE_API_KEY: ${ROOTCAUSE_API_KEY}
ROOTCAUSE_CHALLENGE: teamcity-auth-bypass
FLAG_PATH: /flag/flag.txt
volumes:
- flag:/flag
challenge:
image: matejbasic/cve-2024-27198:1.0
depends_on:
flagger:
condition: service_completed_successfully
environment:
FLAG_PATH: /flag/flag.txt
volumes:
- flag:/flag
ports:
- "8080:8080"
volumes:
flag:
rootcause start teamcity-auth-bypassThe rootcause CLI does all of this in one command. Running a challenge needs your API key, which you generate in your profile.