CVE-2025-31501

7.2 HIGH

📋 TL;DR

CVE-2025-31501 is a cross-site scripting (XSS) vulnerability in Best Practical RT (Request Tracker) that allows attackers to inject malicious JavaScript via RT permalinks. This affects all RT 5.0 installations through version 5.0.7. Attackers can execute arbitrary scripts in victims' browsers when they view manipulated permalinks.

💻 Affected Systems

Products:
  • Best Practical RT (Request Tracker)
Versions: 5.0 through 5.0.7
Operating Systems: All platforms running RT
Default Config Vulnerable: ⚠️ Yes
Notes: All RT 5.0 installations up to 5.0.7 are vulnerable regardless of configuration. The vulnerability exists in the permalink functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal session cookies, hijack authenticated sessions, redirect users to malicious sites, or perform actions on behalf of authenticated users.

🟠

Likely Case

Attackers steal session tokens to gain unauthorized access to RT systems, potentially accessing sensitive ticket data or performing unauthorized actions.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before execution, preventing successful exploitation.

🌐 Internet-Facing: HIGH - RT instances exposed to the internet are directly accessible to attackers who can craft malicious URLs and trick users into clicking them.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could still exploit this, but attack surface is reduced compared to internet-facing deployments.

🎯 Exploit Status

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

Exploitation requires the attacker to craft a malicious permalink URL and have a victim click it while authenticated to RT. No authentication is needed to create the malicious URL, but victim interaction is required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.0.8

Vendor Advisory: https://docs.bestpractical.com/release-notes/rt/5.0.8

Restart Required: Yes

Instructions:

1. Backup your RT database and configuration. 2. Download RT 5.0.8 from the official repository. 3. Follow the RT upgrade documentation for your platform. 4. Restart RT services after upgrade completion.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement custom input validation to sanitize permalink parameters before processing

# Requires custom RT extension development
# Implement proper HTML encoding in RT_Config.pm

Content Security Policy

all

Implement strict CSP headers to mitigate XSS impact

# Add to RT_SiteConfig.pm: Set($CSPHeader, "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'")

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS patterns in URL parameters
  • Educate users about not clicking untrusted RT permalinks and implement URL scanning for external links

🔍 How to Verify

Check if Vulnerable:

Check RT version via web interface admin panel or run: rt-server --version

Check Version:

rt-server --version | grep -i 'rt version'

Verify Fix Applied:

Verify version is 5.0.8 or higher and test permalink functionality with XSS payloads

📡 Detection & Monitoring

Log Indicators:

  • Unusual permalink access patterns
  • JavaScript or script tags in URL parameters in access logs
  • Multiple failed XSS attempts in web server logs

Network Indicators:

  • HTTP requests with JavaScript in query parameters to RT permalink endpoints
  • Unusual outbound connections from RT server after permalink access

SIEM Query:

source="rt_access.log" AND (url="*javascript:*" OR url="*<script>*" OR url="*onload=*" OR url="*onerror=*")

🔗 References

📤 Share & Export