Sonar uncovers vuln in JetBrains’ TeamCity (steal source code, private keys, take control)
September 2023 by Rapid7, Inc. and Sonar
The Vulnerability Research Team at Sonar (the industry-leading solution for Clean Code) has discovered a critical security vulnerability in TeamCity, a popular Continuous Integration and Continuous Deployment (CI/CD) server from JetBrains.
The discovered vulnerability — CVE-2023-42793 — allows unauthenticated attackers to execute arbitrary code on the TeamCity server (remote code execution, RCE). Attackers could leverage this access to steal source code, service secrets, and private keys, take control over attached build agents, and poison build artifacts. Because the vuln doesn’t require a valid account on the target instance, and is trivial to exploit, it is likely to be exploited.
JetBrains made customers aware of the issue, published a corresponding security advisory, and released a fixed version this week. It is strongly advised that all TeamCity users apply the latest patch provided by JetBrains ASAP.