CVE-2025-52552

6.1 MEDIUM

📋 TL;DR

FastGPT versions before 4.9.12 have an open redirect and DOM-based XSS vulnerability in the LastRoute parameter on the login page. Attackers can execute malicious JavaScript in users' browsers or redirect them to malicious sites. This affects all FastGPT instances running vulnerable versions.

💻 Affected Systems

Products:
  • FastGPT
Versions: All versions prior to 4.9.12
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All FastGPT deployments with the vulnerable login page are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal user session tokens, credentials, or perform actions as authenticated users, potentially leading to account takeover and data theft.

🟠

Likely Case

Attackers redirect users to phishing sites or execute limited JavaScript in victims' browsers to steal session data.

🟢

If Mitigated

With proper input validation and sanitization, the attack is prevented entirely.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires tricking users into clicking malicious links but doesn't require authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.9.12

Vendor Advisory: https://github.com/labring/FastGPT/security/advisories/GHSA-r976-rfrv-q24m

Restart Required: Yes

Instructions:

1. Update FastGPT to version 4.9.12 or later. 2. Restart the FastGPT service. 3. Verify the update was successful.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side validation to reject malicious LastRoute parameter values

Implement regex validation: ^[a-zA-Z0-9\/\-\._]+$ for LastRoute parameter

WAF Rule

all

Configure WAF to block requests with suspicious LastRoute parameters

Add WAF rule to block URLs containing javascript: or http:// in LastRoute parameter

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to prevent script execution
  • Monitor and block suspicious redirect patterns in application logs

🔍 How to Verify

Check if Vulnerable:

Check if FastGPT version is below 4.9.12 in application settings or deployment configuration.

Check Version:

Check FastGPT web interface settings or deployment configuration files for version number.

Verify Fix Applied:

Confirm version is 4.9.12 or higher and test that malicious LastRoute parameters are properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual redirect patterns in access logs
  • Requests with suspicious LastRoute parameter values

Network Indicators:

  • Unexpected redirects to external domains from login page

SIEM Query:

source="fastgpt_logs" AND (url="*LastRoute=javascript:*" OR url="*LastRoute=http://*")

🔗 References

📤 Share & Export