TL;DR: A critical Cross-site Scripting (XSS) vulnerability has been discovered in the popular Christina Uechi Add Widgets to Page plugin for WordPress sites. The vulnerability affects plugin versions <= 1.3.2 and can lead to sensitive information theft, unauthorized access, and other malicious attacks. Read on for more information on the vulnerability, code snippet, original references, and how to exploit it.


The Christina Uechi Add Widgets to Page plugin is widely used by WordPress site administrators for adding widgets to pages and posts for easy content management, customization, and display. The plugin has over 100,000 active installations and is developed and maintained by Christina Uechi.

As per the CVE-2023-47808, a significant security vulnerability has been found in versions less than or equal to 1.3.2, resulting in an 'Improper Neutralization of Input During Web Page Generation,' or more commonly known as 'Cross-site Scripting' (XSS) issues. The vulnerability can be exploited by attackers to inject malicious scripts into the targeted website, which then execute in the user's browser and can lead to sensitive data theft, unauthorized access, and other severe attacks.

Code Snippet

The root cause of the vulnerability lies in the plugin's add-widgets-to-page.php file. The file extends the WP_Widget class to implement custom widgets. The vulnerable code snippet is as follows:

public function add_widgets_to_page_mywidget($args, $instance) {
    $title = apply_filters('widget_title', $instance['title']);
    echo $before_widget;
    echo $before_title . $title . $after_title; // Vulnerable line
    echo $after_widget; 

In the above code, the variables $before_title, $title, and $after_title are not being correctly sanitized, making it possible for an attacker to inject malicious JavaScript code into the $title variable, which will then execute in the user's browser.

Exploit Details

To exploit the vulnerability, the attacker needs to insert malicious JavaScript code into the "Title" field of the "Add Widgets to Page" plugin settings. For example:

<script>alert("XSS vulnerability exploited!")</script>

Once the malicious script has been injected and the plugin settings saved, any user visiting the website with pages or posts containing the affected widget will have the script executed in their browser, potentially leading to sensitive information theft and other malicious actions.

Original References

The vulnerability has been reported and documented by multiple cybersecurity researchers and organizations:

1. Official CVE-2023-47808 entry on
2. Christina Uechi's project repository on GitHub revealing the issue:

Mitigation and Recommendations

Site administrators using the Christina Uechi Add Widgets to Page plugin version <= 1.3.2 should take the following actions to address the vulnerability and protect their WordPress sites:

Update the plugin to the latest version.

2. Until the plugin is updated, either disable the plugin or restrict access to trusted users and administrators.

Implement strong input validation and sanitation measures to prevent XSS attacks.

It is also recommended that site administrators and users familiarize themselves with secure coding practices and the risks associated with Cross-site Scripting vulnerabilities.


Published on: 11/22/2023 22:15:08 UTC
Last modified on: 11/28/2023 19:27:25 UTC