The disclosure of CVE-2026-93485, dubbed Comment2Shell, highlights how a seemingly limited cross-site scripting vulnerability can become far more serious when it is combined with the privileges of an authenticated administrator.
The flaw affects WordPress core and allows an unauthenticated visitor to submit a specially crafted comment containing malicious markup. When that comment is later rendered on a vulnerable site, WordPress's formatting process can transform previously sanitized content into executable JavaScript.
If a logged-in administrator views the affected page, the malicious script executes in the administrator's browser session.
That creates a dangerous privilege-escalation path.
The attacker does not need to know the administrator's password, steal a session cookie directly, or compromise the administrator's workstation beforehand. Instead, the administrator's already authenticated browser can be used as the vehicle for performing privileged WordPress actions.
Researchers demonstrated that this can ultimately be chained into remote code execution on the WordPress server, including by abusing the administrator's session to install a malicious plugin containing a web shell.
Why is Comment2Shell different from an ordinary stored XSS?
Stored cross-site scripting vulnerabilities are already serious because malicious JavaScript can remain embedded in website content and execute whenever another user visits the affected page.
Comment2Shell becomes particularly dangerous because the victim can be a WordPress administrator.
When the script executes inside an administrator's authenticated session, requests originating from that browser may carry the administrator's existing WordPress privileges.
This means the attacker can potentially perform actions that would normally require administrator authorization.
The exploitation chain can therefore progress from:
anonymous comment submission → stored JavaScript execution → administrator session abuse → privileged WordPress action → server-side code execution
That transition is what turns the flaw from a browser-level problem into a potential server-compromise scenario.
The vulnerability lies in the gap between sanitization and rendering
One of the most technically important aspects of CVE-2026-93485 is where the security failure occurs.
WordPress sanitizes potentially dangerous HTML when a comment is initially saved.
Ordinarily, this should prevent users from inserting executable JavaScript.
However, the vulnerable processing occurs later, when WordPress reformats the stored comment before displaying it.
Researchers found that a specially placed line break inside an attribute of an otherwise permitted HTML tag could survive the initial sanitization stage.
When WordPress subsequently reformatted the HTML, the structure of the tag changed.
Content that was previously considered harmless could then move into a context interpreted by the browser as an event handler.
The result was executable JavaScript.
This type of vulnerability illustrates an important principle in secure application development:
Data that is safe at one stage of processing may become unsafe after additional transformation.
Security validation therefore cannot always occur only when information first enters an application.
Applications that repeatedly parse, normalize, decode, transform, or re-render untrusted content must consider whether those transformations can change the security meaning of the data.
No click is required once the malicious comment is displayed
Another important aspect of the attack is that the administrator does not necessarily need to click anything inside the malicious comment.
Once the crafted content is rendered in a vulnerable configuration, the JavaScript can execute automatically when the page loads.
This significantly reduces the amount of social engineering required.
The attacker primarily needs the malicious comment to become visible on the site and for an authenticated administrator to subsequently view the page.
Comment moderation should not be treated as a security boundary
WordPress described exploitation as being subject to comment approval.
At first glance, this may appear to reduce the risk substantially.
However, moderation settings vary between installations, and not every WordPress site requires every comment to be manually approved.
The Hacker News notes that comment moderation is not universally enabled by default and that mechanisms intended to hold first-time commenters may not provide a reliable security boundary against this attack chain.
That creates an important defensive lesson:
Human moderation should not substitute for technical input validation and output encoding.
Even where moderation is enabled, an administrator reviewing suspicious content may itself be the privileged user the attacker hopes will render the malicious payload.
Security controls should therefore prevent dangerous content from executing regardless of whether a human moderator sees it.
Theme configuration also affects exploitability
The attack does have conditions.
According to the disclosure, exploitation depends in part on how the WordPress theme renders comments.
The demonstrated technique works with block themes and classic themes that process comments in a similar manner.
That means not every WordPress installation necessarily exposes the identical attack surface.
However, organizations should not use theme configuration as the primary mitigation.
The underlying vulnerability exists in WordPress core across a wide range of releases, and the reliable remediation is to install the appropriate security update.
Affected WordPress versions
The vulnerability reportedly affects WordPress versions from 4.7 through 7.1.
WordPress addressed the issue in its September 17, 2026 security release.
Administrators running current branches should update to the appropriate patched release, including:
- WordPress 7.1 → 7.1.1
- WordPress 7.0 → 7.0.5
- WordPress 6.9 → 6.9.8
Security releases were also issued for older supported branches, extending back to WordPress 4.7.
Given the extremely large WordPress ecosystem, the broad affected-version range is significant.
Legacy installations that remain online for years without regular maintenance are particularly concerning because they may continue exposing vulnerabilities long after newer sites have been patched.
What should WordPress administrators do?
The highest-priority action is straightforward:
Update WordPress core immediately to the latest security release available for the deployed branch.
Organizations that cannot patch immediately should consider temporarily disabling comments or closing comments on exposed content until the update can be applied.
Security teams should also examine whether their web application firewall or security plugin can detect or block crafted comment payloads associated with the vulnerability.
However, WAF rules should be treated as compensating controls rather than replacements for the official patch.
Existing compromise should also be considered
Installing the update prevents exploitation of the known vulnerability, but it does not reverse changes made by an attacker who successfully exploited the site beforehand.
Organizations with reason to believe their site may have been targeted should examine the environment for:
- unfamiliar plugins;
- newly created administrator accounts;
- unexpected PHP files;
- web shells;
- modified themes;
- unexpected scheduled tasks;
- suspicious changes to
wp-config.php; - changes to upload directories;
- unexplained outbound connections; and
- abnormal administrator activity.
Web server access logs and WordPress audit logs should also be reviewed for unusual comment submissions followed by privileged administrative actions.
If compromise is confirmed, organizations should rotate:
- WordPress administrator credentials;
- database credentials where appropriate;
- authentication salts and keys;
- hosting control-panel credentials; and
- other secrets accessible from the compromised environment.
The administrator's browser has become part of the attack surface
Comment2Shell also illustrates a broader security issue that is increasingly important in web application security.
Attackers do not always need to attack the server directly.
Sometimes it is easier to attack the browser of someone who already has permission to control the server.
An authenticated administrator session represents a powerful capability.
If malicious JavaScript can execute within the origin of the WordPress site, the attacker may be able to make authorized requests using that session.
This turns browser security into an important component of server security.
Administrators should therefore:
- avoid remaining permanently logged into administrative interfaces;
- use dedicated browsers or profiles for privileged administration where practical;
- enforce strong authentication;
- restrict administrative access by network where possible;
- minimize the number of administrator accounts; and
- use security monitoring capable of detecting unusual administrative actions.
Multi-factor authentication remains extremely valuable for preventing account takeover, but it does not necessarily stop attacks that abuse an already authenticated session.
The vulnerability also demonstrates why stored XSS should never be dismissed as "just XSS"
Cross-site scripting is sometimes treated as less serious than vulnerabilities such as SQL injection or direct remote code execution.
Comment2Shell demonstrates why that assumption can be misleading.
The true severity of an XSS vulnerability depends heavily on where the script executes and whose privileges it inherits.
Stored XSS that reliably executes in the browser of an unauthenticated visitor may have limited impact.
The same vulnerability executing inside a logged-in administrator's browser can become an entirely different security problem.
Once administrative capabilities such as plugin installation, theme management or file modification become accessible, client-side script execution can become the first step toward server-side compromise.
WordPress has faced several serious core vulnerabilities in 2026
Comment2Shell follows other significant WordPress core security issues disclosed during 2026.
In July, researchers disclosed the wp2shell chain involving CVE-2026-63030 and CVE-2026-60137, which could allow unauthenticated remote code execution against vulnerable installations. Public exploit code subsequently contributed to widespread scanning and exploitation activity.
The September 17 WordPress release also fixed the separately disclosed Click2Shell vulnerability, which could force a logged-in administrator's browser to install and preview a theme and could be chained with a vulnerable theme to achieve code execution.
These vulnerabilities use different technical mechanisms and should not be conflated.
However, taken together they demonstrate how the complexity and enormous deployment footprint of WordPress make core vulnerabilities particularly valuable to attackers.
No confirmed exploitation has been reported so far
There is an important distinction between Comment2Shell and the earlier wp2shell vulnerability.
As of September 22, 2026, there is no public indication that CVE-2026-93485 has been exploited in the wild, and it has not been added to CISA's Known Exploited Vulnerabilities catalog.
That should not be interpreted as a reason to postpone patching.
Technical details of the vulnerability are now public, meaning attackers can study the disclosed mechanism and attempt to develop reliable exploitation techniques.
The period immediately following detailed public disclosure is exactly when organizations should be reducing exposure, not scheduling the issue for some mythical future maintenance window when nobody is busy.
The broader cybersecurity lesson
Comment2Shell illustrates how modern exploitation chains increasingly cross security boundaries.
An attacker begins with nothing more than permission to submit a public website comment.
The attack can then cross several layers:
untrusted input → stored website content → browser execution → authenticated administrator session → privileged WordPress functionality → server execution.
Every individual transition may appear relatively small.
Together, they can result in complete site compromise.
The vulnerability therefore reinforces three fundamental security principles:
Sanitize and encode content at every relevant processing boundary.
Treat privileged browser sessions as part of the application's security perimeter.
Do not evaluate vulnerabilities solely by their first visible impact.
A flaw that initially appears to be anonymous stored XSS can become considerably more dangerous when the affected application gives administrators the ability to install executable code.
Comment2Shell is a useful reminder that when untrusted content can reach a privileged user's browser, the boundary between client-side compromise and server-side compromise can become surprisingly thin.

A new flaw in WordPress core let an anonymous visitor leave a comment that planted a hidden script on the page. If a logged-in administrator later opened that page, the script could run code on the site's server. WordPress fixed the flaw, tracked as CVE-2026-93485 and dubbed "Comment2Shell," on September 17 in version 7.1.1 and told site owners to update right away. There is
Source: WordPress Comment2Shell Flaw Can Turn Anonymous Comment XSS Into RCE via Admin Session via The Hacker News — published 22 Sep 2026.
Was this article helpful?
Your feedback helps us improve the knowledge base.