CVE-2023-6541

6.1 MEDIUM

📋 TL;DR

The Allow SVG WordPress plugin before version 1.2.0 fails to sanitize uploaded SVG files, allowing users with Author privileges or higher to upload malicious SVG files containing cross-site scripting (XSS) payloads. This vulnerability affects WordPress sites using the vulnerable plugin version.

💻 Affected Systems

Products:
  • Allow SVG WordPress plugin
Versions: All versions before 1.2.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with the Allow SVG plugin enabled and at least one user with Author role or higher.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker with Author access could upload malicious SVG files that execute arbitrary JavaScript in visitors' browsers, potentially stealing session cookies, redirecting users to malicious sites, or performing actions on behalf of authenticated users.

🟠

Likely Case

Authenticated attackers upload SVG files with XSS payloads that execute when viewed by administrators or other users, leading to session hijacking or limited site defacement.

🟢

If Mitigated

With proper user role management and content security policies, impact is limited to isolated XSS execution without significant privilege escalation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access with at least Author privileges. SVG XSS techniques are well-documented and easy to implement.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2.0

Vendor Advisory: https://wpscan.com/vulnerability/bbe866b8-7497-4e5c-8f59-bb8edac1dc71/

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'Allow SVG' plugin. 4. Click 'Update Now' if update available. 5. Alternatively, download version 1.2.0+ from WordPress repository and replace plugin files.

🔧 Temporary Workarounds

Disable SVG uploads via functions.php

all

Add code to theme's functions.php to disable SVG uploads entirely

add_filter('upload_mimes', function($mimes) { unset($mimes['svg']); unset($mimes['svgz']); return $mimes; });

Restrict user roles

all

Remove Author role from untrusted users and limit SVG uploads to trusted administrators only

🧯 If You Can't Patch

  • Temporarily deactivate the Allow SVG plugin until patching is possible
  • Implement Content Security Policy headers to restrict script execution from uploaded files

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Installed Plugins for Allow SVG version. If version is below 1.2.0, system is vulnerable.

Check Version:

wp plugin list --name=allow-svg --field=version

Verify Fix Applied:

Confirm Allow SVG plugin version is 1.2.0 or higher in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • WordPress media upload logs showing SVG file uploads by Author role users
  • Web server logs with requests to uploaded SVG files

Network Indicators:

  • HTTP requests to SVG files in uploads directory with suspicious content
  • Outbound connections from site to external domains following SVG file access

SIEM Query:

source="wordpress.log" AND "uploaded" AND ".svg" AND (user_role="author" OR user_role="editor" OR user_role="contributor")

🔗 References

📤 Share & Export