CVE-2023-31230

7.1 HIGH

📋 TL;DR

This CVE describes a Cross-Site Request Forgery (CSRF) vulnerability in the Haoqisir Baidu Tongji generator WordPress plugin that can lead to Stored Cross-Site Scripting (XSS). Attackers can trick authenticated administrators into executing malicious actions, potentially injecting malicious scripts into WordPress sites. WordPress administrators using vulnerable versions of this plugin are affected.

💻 Affected Systems

Products:
  • Haoqisir Baidu Tongji generator WordPress plugin
Versions: All versions up to and including 1.0.2
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress administrator access for exploitation via CSRF. The plugin must be installed and activated.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could inject persistent malicious JavaScript that steals administrator credentials, redirects visitors to malicious sites, or takes full control of the WordPress site.

🟠

Likely Case

Attackers would typically inject scripts to steal session cookies or redirect users to phishing pages, compromising user accounts and site integrity.

🟢

If Mitigated

With proper CSRF protections and input validation, the vulnerability would be prevented, maintaining normal plugin functionality.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

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

Exploitation requires tricking an authenticated administrator into clicking a malicious link or visiting a crafted page. No authentication bypass is needed beyond the CSRF attack vector.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.0.3 or later

Vendor Advisory: https://patchstack.com/database/vulnerability/baidu-tongji-generator/wordpress-baidu-tongji-generator-plugin-1-0-2-cross-site-request-forgery-csrf-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'Baidu Tongji generator' and click 'Update Now' if available. 4. Alternatively, download version 1.0.3+ from WordPress.org and manually update. 5. Verify the plugin version shows 1.0.3 or higher.

🔧 Temporary Workarounds

Disable Plugin

all

Temporarily disable the vulnerable plugin until patched

wp plugin deactivate baidu-tongji-generator

Implement CSRF Protection

all

Add WordPress nonce verification to plugin forms if custom patching

Add wp_nonce_field() and wp_verify_nonce() calls to plugin PHP files

🧯 If You Can't Patch

  • Remove the Baidu Tongji generator plugin entirely from the WordPress installation
  • Implement web application firewall (WAF) rules to block CSRF attempts targeting the plugin endpoints

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Installed Plugins for 'Baidu Tongji generator' version 1.0.2 or lower

Check Version:

wp plugin get baidu-tongji-generator --field=version

Verify Fix Applied:

Verify plugin version is 1.0.3 or higher in WordPress admin plugins list

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /wp-admin/admin-post.php with baidu-tongji-generator parameters
  • Multiple failed CSRF token validations in WordPress debug logs

Network Indicators:

  • HTTP requests containing 'baidu-tongji-generator' parameters without proper referrer headers
  • Suspicious redirects or script injections on site pages

SIEM Query:

source="wordpress.log" AND "baidu-tongji-generator" AND ("admin-post" OR "csrf")

🔗 References

📤 Share & Export