CVE-2024-56349

5.3 MEDIUM

📋 TL;DR

This vulnerability in JetBrains TeamCity allows unauthorized users to modify build logs due to improper access control. It affects organizations using TeamCity for CI/CD pipelines where unauthorized users could tamper with build artifacts. The impact is limited to log modification rather than code execution.

💻 Affected Systems

Products:
  • JetBrains TeamCity
Versions: All versions before 2024.12
Operating Systems: All supported platforms
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all TeamCity installations with default configurations. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could modify build logs to hide malicious activity, obscure security incidents, or manipulate audit trails, potentially enabling supply chain attacks if logs are used for compliance verification.

🟠

Likely Case

Unauthorized internal users or compromised accounts could tamper with build logs to hide errors, manipulate build status reporting, or interfere with debugging processes.

🟢

If Mitigated

With proper access controls and monitoring, impact is limited to log integrity issues that can be detected through log verification mechanisms.

🌐 Internet-Facing: MEDIUM - If TeamCity is exposed to the internet, attackers could exploit this to tamper with logs, but requires some level of access to the system.
🏢 Internal Only: MEDIUM - Internal users with limited permissions could escalate privileges to modify logs they shouldn't have access to.

🎯 Exploit Status

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

Exploitation requires some level of access to the TeamCity instance but not administrative privileges. The vulnerability is in access control logic, making exploitation straightforward once initial access is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2024.12 or later

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

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Restrict Access to Build Logs

all

Implement additional access controls and monitoring for build log access and modification.

# Configure TeamCity project roles to restrict 'View build log' and 'Edit build log' permissions
# Review and tighten user permissions in Administration -> Users & Groups

Enable Audit Logging

all

Enable comprehensive audit logging to detect unauthorized log modification attempts.

# In TeamCity, enable audit logging in Administration -> Audit
# Configure log retention and monitoring for audit events

🧯 If You Can't Patch

  • Implement strict access controls and principle of least privilege for all TeamCity users
  • Enable and regularly review audit logs for unauthorized log modification attempts

🔍 How to Verify

Check if Vulnerable:

Check TeamCity version in Administration -> Server Administration -> Server Configuration. If version is below 2024.12, the system is vulnerable.

Check Version:

# On TeamCity server, check version via: cat $TEAMCITY_HOME/buildAgent/logs/teamcity-server.log | grep 'TeamCity' | head -1

Verify Fix Applied:

After upgrading, verify version is 2024.12 or higher in Administration -> Server Administration -> Server Configuration. Test that unauthorized users cannot modify build logs.

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized access attempts to build logs
  • Unexpected modifications to build logs
  • Failed permission checks in audit logs

Network Indicators:

  • Unusual API calls to build log endpoints from unauthorized users

SIEM Query:

source="teamcity" AND (event_type="log_modification" OR event_type="permission_violation") AND user_role!="admin"

🔗 References

📤 Share & Export