CVE-2024-39879

5.0 MEDIUM

📋 TL;DR

This vulnerability in JetBrains TeamCity exposes application tokens in EC2 Cloud Profile settings, potentially allowing unauthorized access to cloud resources. It affects TeamCity administrators who use AWS EC2 cloud profiles. The exposure occurs through improper handling of sensitive data in configuration interfaces.

💻 Affected Systems

Products:
  • JetBrains TeamCity
Versions: All versions before 2024.03.3
Operating Systems: All platforms running TeamCity
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations using AWS EC2 Cloud Profiles with application tokens configured.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal application tokens and gain unauthorized access to AWS EC2 resources, potentially leading to data exfiltration, resource hijacking, or lateral movement within cloud infrastructure.

🟠

Likely Case

Unauthorized users with access to TeamCity configuration interfaces could view and potentially copy exposed application tokens, compromising the security of associated AWS accounts.

🟢

If Mitigated

With proper access controls limiting configuration interface access to authorized administrators only, the exposure risk is significantly reduced to trusted insiders.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires access to TeamCity configuration interfaces where EC2 Cloud Profile settings are displayed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2024.03.3

Vendor Advisory: https://www.jetbrains.com/privacy-security/issues-fixed/

Restart Required: Yes

Instructions:

1. Backup TeamCity configuration and data. 2. Download TeamCity 2024.03.3 or later from JetBrains website. 3. Stop TeamCity service. 4. Install the updated version following JetBrains upgrade documentation. 5. Restart TeamCity service. 6. Verify successful upgrade.

🔧 Temporary Workarounds

Restrict Configuration Access

all

Limit access to TeamCity administration interfaces to only authorized administrators using role-based access controls.

Rotate Exposed Tokens

all

Immediately rotate any AWS application tokens that may have been exposed through TeamCity EC2 Cloud Profiles.

aws iam update-access-key --access-key-id <KEY_ID> --status Inactive
aws iam create-access-key --user-name <USERNAME>

🧯 If You Can't Patch

  • Immediately rotate all AWS application tokens configured in TeamCity EC2 Cloud Profiles.
  • Implement strict access controls to limit TeamCity administration interface access to essential personnel only.

🔍 How to Verify

Check if Vulnerable:

Check TeamCity version in Administration → Server Administration → Global Settings. If version is earlier than 2024.03.3 and EC2 Cloud Profiles are configured, the system is vulnerable.

Check Version:

Check TeamCity web interface at Administration → Server Administration → Global Settings, or examine teamcity-server.log for version information.

Verify Fix Applied:

After upgrading, verify version shows 2024.03.3 or later in Administration → Server Administration → Global Settings, and confirm application tokens are no longer visible in EC2 Cloud Profile settings.

📡 Detection & Monitoring

Log Indicators:

  • Unusual access patterns to TeamCity administration interfaces
  • Multiple failed login attempts followed by successful access to configuration pages

Network Indicators:

  • Unusual outbound connections from TeamCity server to AWS APIs using potentially compromised tokens

SIEM Query:

source="teamcity" AND (event_type="admin_access" OR url_path="/admin/*") AND user NOT IN ["authorized_admins"]

🔗 References

📤 Share & Export