Skip to content
XSS Write-up Intermediate

Newsletter Plugin Vulnerabilities Affect Over 300,000 Sites

The Newsletter WordPress plugin had a reflected XSS flaw in an AJAX handler that passed unfiltered options to a rendering function, and a PHP object injection flaw because the same handler unserialized user-supplied data. An attacker could execute JavaScript in a victim's browser or, with additional vulnerable code, achieve site takeover.

wordfence.com

Published on wordfence.com

On July 13, 2020, our Threat Intelligence team was alerted to a recently patched vulnerability in Newsletter, a WordPress plugin with over 300,000 installations. While investigating this vulnerability, we discovered two additional, more serious vulnerabilities, including a reflected Cross-Site Scripting(XSS)…

Wordfence Author, on wordfence.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the AJAX handler accepted user-supplied options without validation and passed them to a renderer and to unserialize(), allowing script injection and PHP object injection.

Impact

The XSS could inject backdoors or add malicious administrative users if a victim is tricked into sending a request, and the object injection could lead to site takeover only if additional vulnerable software is present; firewall rules limited exploitation for Wordfence users.

What the attacker needed

Logged-in user for XSS; victim clicks a crafted link; subscriber account for object injection; additional vulnerable plugin or theme

The fix

The vulnerabilities were fixed in version 6.8.2 by filtering the options and avoiding unsafe unserialization.

How it was found

  1. Send a POST request to wp-admin/admin-ajax.php with action set to tnpc_render, b set to html, and options set to arbitrary JavaScript.
  2. Alternatively, send a similar request with options[]= and encoded_options set to a base64-encoded JSON string containing arbitrary JavaScript.
  3. For object injection, log in as a subscriber and send a POST request with action set to tpnc_render and options[inline_edits] set to a serialized PHP object.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The plugin had a feature that let logged-in users preview newsletter blocks, but it did not check the data it received. One bug let an attacker slip harmful JavaScript into that data so it would run in a victim's browser; another let an attacker send a crafted PHP object that could be misused by other code on the site.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.