Site Security, Spam Protection
Estimated reading time: 6 min read

WordPress 7.1.3: Pending Spam Comments Could Carry XSS

Ben Marshall Ben Marshall Full-stack Developer & Engineering Manager
Shield graphic illustrating the WordPress 7.1.3 security release and the pending comment XSS fix
On this page
WordPress 7.1.3 fixes 7 flaws, including a stored XSS on the Comments screen exploitable via pending comments. Update now and don't click links in pending comments.

WordPress 7.1.3 came out on October 6, 2026 with seven security fixes, and two of them involve comments.[1][2] The most important for anyone who moderates: a stored XSS on the Comments screen that is “exploitable via pending comments.”[2] Update to 7.1.3 now, and don’t click links inside pending comments until you have.

Spam comments are usually just noise. This release is a reminder that the moderation queue is also an attack surface, because someone with admin rights reads it every day.

TL;DR: What to do right now

  1. Check that every site shows WordPress 7.1.3 under Dashboard, then Updates. Most sites get it automatically.[1][5]
  2. If a site is still on 7.1.0, 7.1.1 or 7.1.2, update it today. Those are the versions Patchstack lists for the comment XSS.[3]
  3. Until a site is updated, don’t click links inside pending comments. Mark obvious spam from the list view instead.
  4. If you embed Imgur posts, clear cached embeds after updating. The patch does not remove cached oEmbed content.[3]
  5. Review who has Contributor, Author or Editor accounts. Several of the fixes need one of those roles.[3]

What happened

WordPress released 7.1.3 as a security and maintenance release with 7 security fixes and 4 bug fixes.[1] The security team backported the fixes to all branches eligible for security fixes, currently back to 4.7, but only the latest version is actively supported.[1]

The announcement gives no CVE numbers, CVSS scores or details on whether any of the flaws are being exploited.[4] Patchstack, whose researcher reported one of the bugs, published the technical breakdown we rely on below.[3]

Fix in 7.1.3Who can trigger itReported by
Stored XSS on the Comments admin screen, via pending commentsAnyone who can leave a comment, if a moderator clicks the link[3]Thomas Chauchefoin, Trail of Bits[2]
Comments on private and unpublished posts shown to visitorsUnauthenticated visitors[2]Ananda Dhakal, Patchstack[2]
XSS through Imgur embedsUsers who can embed content, Contributor and up[3]Zhengyu Liu, Jingcheng Yang, Gavin Zhong[2]
Denial of service in WP_Http::make_absolute_url()Contributor and up, via link previews[3]Anthropic[2]
Second-order SQL injection in the WXR exportAn admin running an export on tampered data[3]Anthropic[2]
Authors could make posts stickyAuthor role, through the REST API[3]Anthropic[2]
Forgeable {status}_{type} hook parametersDepends on plugins passing raw values[3]Alex Concha, WordPress security team[2]

Why it matters for your site

The comment queue was the way in

According to Patchstack, the Help tab code on admin screens passed a link’s address to jQuery in a way that could build HTML from it.[3] A pending comment could carry such a link. Visitor comments couldn’t carry a CSS class before 7.1.0, which added class support for note mentions, so 7.1.0 through 7.1.2 are affected.[3] The fix changes one function call so the link is only read as a selector.[3]

In plain terms: a spammer drops a comment with a booby-trapped link, it waits in moderation, and a moderator who clicks it on the Comments screen runs the attacker’s script inside wp-admin with the moderator’s permissions. That is why we suggest a no-click rule for pending comments until every site is on 7.1.3.

This is the second comment-borne WordPress issue we’ve covered in two weeks. Our Comment2Shell write-up covers the earlier one.[6]

Private posts could leak their comments

The second comment bug is a quiet one. For single-post comment feeds, WordPress loaded the comments before checking if the visitor could see the post, and feeds don’t return a 404.[3] So anyone could read comments on private or unpublished posts through the feed.[2][3] If you use private posts for client reviews, members or internal notes, assume those comments were readable.

Embeds and other roles

WordPress normally sandboxes HTML from embed providers it doesn’t trust. Imgur was on the trusted list, so content from Imgur’s API was printed straight onto the page. 7.1.3 removes Imgur from that list.[3] Three more fixes need a logged-in Contributor, Author or admin, which matters most on sites with guest writers, agencies or many editors.[3]

The release also fixes a bug where image uploads could fail with a fatal error on hosts without PHP’s DOM extension.[4] It’s not a security issue, but if uploads broke on your site since 7.0, this may be why.

How to check for WordPress 7.1.3 and update

Confirm automatic updates are on

Existing installs receive minor core updates by default.[5] Most sites will already be on 7.1.3. The exceptions are sites where someone turned updates off, usually in wp-config.php. WordPress says disabling security updates is strongly discouraged.[5] If you have shell access, this checks the version and looks for the two settings that block updates:

wp core version
grep -nE "AUTOMATIC_UPDATER_DISABLED|WP_AUTO_UPDATE_CORE" \
  wp-config.php
wp core update --minor

If AUTOMATIC_UPDATER_DISABLED is true or WP_AUTO_UPDATE_CORE is false, that site won’t patch itself.[5] Change it, or put the site on a manual update schedule. No shell? Dashboard, then Updates, then Update Now does the same job.[1]

After updating

  • Pending queue: look through comments that arrived while the site was on 7.1.0 to 7.1.2. Delete ones with odd links instead of opening them.
  • Admin users: if a moderator clicked an unknown link in a pending comment on an unpatched site, check for new admin accounts and changed settings, and reset that moderator’s password.
  • Private posts: open a private post’s comment feed in a logged-out browser. After 7.1.3 it should not show the comments.[3]
  • Imgur embeds: clear cached oEmbed content so old Imgur output is fetched again under the new rules.[3]

Fewer spam comments means less to click

The patch is the fix. But the comment XSS only works if a malicious comment reaches your queue and someone opens it. The less junk in moderation, the fewer chances for a tired moderator to click the wrong thing. Our guide to stopping WordPress spam covers ways to cut that volume.[8] And if you skipped last month’s core update, our WordPress 7.1.2 post is worth a look too.[7]

Zero Spam doesn’t patch WordPress and doesn’t scan comments for this specific exploit. What it does is check comments, form submissions and registrations against known bad actors, through the free WordPress plugin or the API, so less spam lands in moderation. If it fits, start on the free Explorer plan.

FAQ

Frequently Asked Questions

Which WordPress versions are affected by the pending comment XSS?

Patchstack lists 7.1.0 through 7.1.2. Versions before 7.1.0 didn’t allow the class attribute in visitor comments that the attack needs. Update to 7.1.3.

Is the WordPress 7.1.3 comment XSS being exploited?

The official announcement doesn’t say. It gives no CVE numbers, severity scores or exploitation details. Treat it as urgent anyway, because the attack only needs a comment and one click.

Will my site update to 7.1.3 automatically?

Usually yes. Existing WordPress installs receive minor core updates by default, unless AUTOMATIC_UPDATER_DISABLED or WP_AUTO_UPDATE_CORE turns them off, or your host manages updates for you.

Do I need to do anything after updating?

Review comments that arrived before the update without clicking their links, check for unexpected admin accounts if anyone did click, and clear cached Imgur embeds.

I run an older branch like 6.9. Am I covered?

WordPress backported the fixes to branches eligible for security fixes, back to 4.7, but only the latest version is actively supported. Moving to 7.1.3 is the safe choice.

Sources & References