CVE-2024-50581

4.6 MEDIUM

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts into YouTrack comments due to improper HTML sanitization. When exploited, it enables cross-site scripting (XSS) attacks that could steal user sessions or perform unauthorized actions. All YouTrack instances running vulnerable versions are affected.

💻 Affected Systems

Products:
  • JetBrains YouTrack
Versions: All versions before 2024.3.47707
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All YouTrack deployments with comment functionality enabled are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, take over YouTrack instances, and access sensitive project data or pivot to internal networks.

🟠

Likely Case

Attackers could steal user session cookies, perform actions as authenticated users, or deface comment sections with malicious content.

🟢

If Mitigated

With proper input validation and output encoding, impact is limited to minor UI disruption or script execution in isolated contexts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires ability to create or modify comments, typically requiring some level of authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2024.3.47707

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

Restart Required: Yes

Instructions:

1. Backup your YouTrack instance. 2. Download YouTrack 2024.3.47707 or later from JetBrains. 3. Stop the YouTrack service. 4. Install the updated version. 5. Restart the YouTrack service. 6. Verify the version is updated.

🔧 Temporary Workarounds

Disable HTML in comments

all

Configure YouTrack to disable HTML rendering in comments to prevent script execution

Configure via YouTrack admin interface: Settings > Workflows > Disable HTML formatting in comments

Restrict comment permissions

all

Limit who can create or edit comments to trusted users only

Configure via YouTrack admin interface: Settings > Permissions > Comment permissions

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS payloads in comment submissions
  • Enable Content Security Policy (CSP) headers to restrict script execution sources

🔍 How to Verify

Check if Vulnerable:

Check YouTrack version in admin interface or via API endpoint /api/admin/version

Check Version:

curl -s http://youtrack-instance/api/admin/version | grep version

Verify Fix Applied:

Verify version is 2024.3.47707 or later and test comment functionality with XSS payloads

📡 Detection & Monitoring

Log Indicators:

  • Unusual comment creation patterns
  • HTML/script tags in comment content logs
  • Multiple failed comment submissions with script-like content

Network Indicators:

  • HTTP requests with script tags in comment parameters
  • Unusual outbound connections from YouTrack server after comment submissions

SIEM Query:

source="youtrack" AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=") AND event_type="comment"

🔗 References

📤 Share & Export