<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k" -->

---
title: WordPress “Comment2Shell” XSS-to-RCE Chain Lets...
description: A high-severity vulnerability (CVE-2026-93485, CVSS 7.1) in WordPress Core allows unauthenticated attackers to achieve remote code execution through a stored...
canonical: https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: WordPress “Comment2Shell” XSS-to-RCE Chain Lets Unauthenticated Attackers Compromise Servers via Malicious Comments | daily.dev
og:description: A high-severity vulnerability (CVE-2026-93485, CVSS 7.1) in WordPress Core allows unauthenticated attackers to achieve remote code execution through a stored...
og:url: https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k
og:image: https://api.daily.dev/og/posts/8wlrBSg8k.png
og:image:alt: WordPress “Comment2Shell” XSS-to-RCE Chain Lets Unauthenticated Attackers Compromise Servers via Malicious Comments
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress “Comment2Shell” XSS-to-RCE Chain Lets Unauthenticated Attackers Compromise Servers via Malicious Comments

**[Orca Security Blog](https://daily.dev/sources/orca-security-blog)** · 3 min read · 3 upvotes · 0 comments

## Summary

A high-severity vulnerability (CVE-2026-93485, CVSS 7.1) in WordPress Core allows unauthenticated attackers to achieve remote code execution through a stored XSS flaw in the wpautop() function used to render comments. A crafted anonymous comment can break tag parsing and inject executable JavaScript that fires when an administrator views the page, letting attackers hijack the admin session to install a malicious plugin as a web shell. The bug affects WordPress 4.7 through 7.1.0 — nearly all installations, including all default block themes since Twenty Twenty-Two. WordPress 7.1.1 (with backports down to 4.7.36) patches this along with 10 other security issues including path traversal and CSRF. No public exploit or active exploitation has been reported yet, but low attack complexity and no authentication requirement make it high risk, especially on sites with comments enabled and lax moderation.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://orca.security/resources/research/cve-2026-93485-wordpress-comment2shell-rce>

## Questions this post answers

### What is CVE-2026-93485 in WordPress and how does it lead to remote code execution?

CVE-2026-93485 is a stored cross-site scripting flaw (CVSS 7.1) in the wpautop() function in wp-includes/formatting.php, caused by a mismatch between comment sanitization at save time and HTML reformatting at display time. An unauthenticated attacker submits a crafted comment containing a specially built HTML attribute with a '>' character that breaks wpautop's tag parsing, injecting a live event handler. When a logged-in administrator views the page, the script runs automatically and uses the admin's session to install a plugin containing a web shell, achieving full remote code execution on the server.

_Teams tracking WordPress vulnerabilities like this one can follow patch guidance on daily.dev._

### Which WordPress versions are affected by the Comment2Shell XSS-to-RCE vulnerability and what should I update to?

WordPress Core versions 4.7 through 7.1.0 are affected, covering the vast majority of installations, including all default block themes since Twenty Twenty-Two. Sites should upgrade to WordPress 7.1.1, or apply the matching security backport such as 7.0.5, 6.9.8, or backports down to 4.7.36. Sites with automatic background updates enabled receive the patch automatically. The 7.1.1 release also fixes 10 other vulnerabilities including path traversal and CSRF issues.

_daily.dev helps developers stay on top of version-specific security patches like the WordPress 7.1.1 release._

### How can I protect a WordPress site from the wpautop comment XSS vulnerability if I can't patch immediately?

Disable comments site-wide, enable strict comment moderation requiring manual approval for every comment (since auto-approval for previously approved commenters lowers the exploitation barrier), deploy web application firewall rules to filter malicious comment payloads, and audit installed plugins for unexpected or unfamiliar entries that could indicate a web shell was already installed.

_daily.dev surfaces mitigation steps for developers who can't patch a vulnerable dependency right away._

## Similar posts on daily.dev

- [wp2shell: WordPress Patches a Pre-Auth RCE That Needed No Plugins](https://daily.dev/posts/wp2shell-wordpress-patches-a-pre-auth-rce-that-needed-no-plugins-pmh9adxqu) · Latest Hacking News · 2 upvotes · 0 comments
- [CISA flags WordPress RCE flaw as actively exploited in attacks](https://daily.dev/posts/cisa-flags-wordpress-rce-flaw-as-actively-exploited-in-attacks-ttytuolnc) · BleepingComputer · 2 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#wordpress](https://daily.dev/tags/wordpress)

[View this post on daily.dev](https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"WordPress “Comment2Shell” XSS-to-RCE Chain Lets Unauthenticated Attackers Compromise Servers via Malicious Comments","url":"https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k"},"datePublished":"2026-09-22T17:40:28.490Z","dateModified":"2026-09-22T17:40:54.021Z","description":"A high-severity vulnerability (CVE-2026-93485, CVSS 7.1) in WordPress Core allows unauthenticated attackers to achieve remote code execution through a stored...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0b0745e020f2bce6985ab63390871c8b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0b0745e020f2bce6985ab63390871c8b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Orca Security Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Orca Security Blog","logo":"https://media.daily.dev/image/upload/s--kkQFNboJ--/f_auto,q_auto/v1780213281/logos/orca-security-blog?_a=BAMAMiWQ0","url":"https://daily.dev/sources/orca-security-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,wordpress","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Orca Security Blog","item":"https://daily.dev/sources/orca-security-blog"},{"@type":"ListItem","position":3,"name":"WordPress “Comment2Shell” XSS-to-RCE Chain Lets Unauthenticated Attackers Compromise Servers via Malicious Comments"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/wordpress-comment2shell-xss-to-rce-chain-lets-unauthenticated-attackers-compromise-servers-via-mal-8wlrbsg8k#faq","mainEntity":[{"@type":"Question","name":"What is CVE-2026-93485 in WordPress and how does it lead to remote code execution?","acceptedAnswer":{"@type":"Answer","text":"CVE-2026-93485 is a stored cross-site scripting flaw (CVSS 7.1) in the wpautop() function in wp-includes/formatting.php, caused by a mismatch between comment sanitization at save time and HTML reformatting at display time. An unauthenticated attacker submits a crafted comment containing a specially built HTML attribute with a '\u003e' character that breaks wpautop's tag parsing, injecting a live event handler. When a logged-in administrator views the page, the script runs automatically and uses the admin's session to install a plugin containing a web shell, achieving full remote code execution on the server. Teams tracking WordPress vulnerabilities like this one can follow patch guidance on daily.dev."}},{"@type":"Question","name":"Which WordPress versions are affected by the Comment2Shell XSS-to-RCE vulnerability and what should I update to?","acceptedAnswer":{"@type":"Answer","text":"WordPress Core versions 4.7 through 7.1.0 are affected, covering the vast majority of installations, including all default block themes since Twenty Twenty-Two. Sites should upgrade to WordPress 7.1.1, or apply the matching security backport such as 7.0.5, 6.9.8, or backports down to 4.7.36. Sites with automatic background updates enabled receive the patch automatically. The 7.1.1 release also fixes 10 other vulnerabilities including path traversal and CSRF issues. daily.dev helps developers stay on top of version-specific security patches like the WordPress 7.1.1 release."}},{"@type":"Question","name":"How can I protect a WordPress site from the wpautop comment XSS vulnerability if I can't patch immediately?","acceptedAnswer":{"@type":"Answer","text":"Disable comments site-wide, enable strict comment moderation requiring manual approval for every comment (since auto-approval for previously approved commenters lowers the exploitation barrier), deploy web application firewall rules to filter malicious comment payloads, and audit installed plugins for unexpected or unfamiliar entries that could indicate a web shell was already installed. daily.dev surfaces mitigation steps for developers who can't patch a vulnerable dependency right away."}}]}
```

