CVE-2025-56304

6.1 MEDIUM

📋 TL;DR

This cross-site scripting (XSS) vulnerability in YzmCMS allows attackers to inject malicious scripts via the referer header during user registration. When exploited, it can enable session hijacking, credential theft, or website defacement. All YzmCMS installations up to version 7.3 with user registration enabled are affected.

💻 Affected Systems

Products:
  • YzmCMS
Versions: All versions through 7.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with user registration functionality enabled. The vulnerability is in the referer header processing during registration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover of admin users, leading to full website compromise, data exfiltration, or malware distribution to visitors.

🟠

Likely Case

Session hijacking of regular users, credential theft via phishing, or website defacement affecting user trust.

🟢

If Mitigated

Limited impact with proper input validation and output encoding, potentially only affecting non-sensitive user data.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

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

Exploitation requires tricking users into visiting a malicious registration link. No authentication needed to trigger the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 7.4 or later

Vendor Advisory: https://www.yzmcms.com/

Restart Required: No

Instructions:

1. Backup your current installation. 2. Download YzmCMS 7.4 or later from the official website. 3. Replace affected files with patched versions. 4. Clear any cached content. 5. Test registration functionality.

🔧 Temporary Workarounds

Input Validation for Referer Header

all

Add server-side validation to sanitize referer header input before processing

Modify registration controller to validate referer header using regex: /^[a-zA-Z0-9\-\.\/\?\=\&\_]+$/

Disable User Registration

all

Temporarily disable user registration functionality if not required

Edit configuration to disable registration: $config['user_reg'] = 0;

🧯 If You Can't Patch

  • Implement WAF rules to block malicious referer headers containing script tags
  • Add Content Security Policy headers to restrict script execution

🔍 How to Verify

Check if Vulnerable:

Test registration with malicious referer header containing <script>alert('XSS')</script> and check if script executes

Check Version:

Check YzmCMS version in admin panel or view source for version metadata

Verify Fix Applied:

Attempt same XSS test after patching - script should not execute and input should be properly sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual referer headers containing script tags or JavaScript code in registration logs
  • Multiple failed registration attempts with similar referer patterns

Network Indicators:

  • HTTP requests to registration endpoint with suspicious referer headers
  • Outbound connections to unknown domains following registration

SIEM Query:

source="web_logs" AND uri="/register" AND referer CONTAINS "<script>"

🔗 References

📤 Share & Export