CVE-2024-51229

8.8 HIGH

📋 TL;DR

This Cross-Site Scripting (XSS) vulnerability in LinZhaoguan pb-cms v2.0 allows remote attackers to inject malicious scripts via the theme management function. When exploited, attackers can execute arbitrary code in victims' browsers, potentially stealing session cookies, redirecting users, or performing actions on their behalf. All users running pb-cms v2.0 are affected.

💻 Affected Systems

Products:
  • LinZhaoguan pb-cms
Versions: v2.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the theme management function, which is typically accessible to authenticated users with appropriate permissions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover, session hijacking, credential theft, and unauthorized administrative actions leading to full system compromise.

🟠

Likely Case

Session hijacking, credential theft, defacement of website content, and redirection to malicious sites.

🟢

If Mitigated

Limited impact with proper input validation, output encoding, and Content Security Policy (CSP) headers in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to the theme management interface, typically requiring authentication. The vulnerability is in the input handling of theme-related parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check the Gitee repository for updates

Vendor Advisory: https://gitee.com/LinZhaoguan/pb-cms/issues/IAYHUP

Restart Required: No

Instructions:

1. Check the Gitee repository for patched versions or commits addressing CVE-2024-51229. 2. Update to the latest secure version. 3. Verify the fix by testing theme management functionality.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and output encoding for all user-controlled inputs in theme management functions.

Content Security Policy (CSP)

all

Deploy a strict CSP header to mitigate the impact of XSS attacks by restricting script execution sources.

🧯 If You Can't Patch

  • Disable or restrict access to the theme management function to only trusted administrators.
  • Implement a Web Application Firewall (WAF) with XSS protection rules to block malicious payloads.

🔍 How to Verify

Check if Vulnerable:

Test the theme management function by attempting to inject script payloads (e.g., <script>alert('XSS')</script>) and observe if they execute.

Check Version:

Check the CMS version in the admin panel or configuration files; for pb-cms v2.0, it is vulnerable.

Verify Fix Applied:

After patching, retest the theme management function with the same payloads to ensure they are properly sanitized and do not execute.

📡 Detection & Monitoring

Log Indicators:

  • Unusual theme modification requests, suspicious input patterns in theme-related logs, or unexpected script tags in theme data.

Network Indicators:

  • HTTP requests containing script payloads to theme management endpoints.

SIEM Query:

source="web_logs" AND (uri="/theme*" OR uri="/admin/theme*") AND (content="<script>" OR content="javascript:")

🔗 References

📤 Share & Export