Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
POC-WP-CORE-CVE-2026-93485 — Laboratorio pedagógico de CVE-2026-93485 (Comment2Shell): stored XSS no autenticado en WordPress core vía wpautop -> RCE, con demo del root cause auto-verificada, control 7.1.1 y la vía Post2Shell | Kitploit
Tools/GitHubGitHub/686f6c61/poc-wp-core-cve-2026-93485
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingPapers & ResearchLearning & EducationLabs & Practice
GitHub
686f6c61/poc-wp-core-cve-2026-93485

POC-WP-CORE-CVE-2026-93485

Laboratorio pedagógico de CVE-2026-93485 (Comment2Shell): stored XSS no autenticado en WordPress core vía wpautop -> RCE, con demo del root cause auto-verificada, control 7.1.1 y la vía Post2Shell

View RepositoryWebsite
2181 month agoNot yet reviewed
Share

Pedagogical lab — CVE-2026-93485 "Comment2Shell"

WordPress core · Unauthenticated stored XSS -> RCE via admin session · zero-click CVSS 3.1 7.1 (Patchstack) · found by Rafie Muhammad (Awesome Motive) · fixed in WordPress 7.1.1 (2026-09-17), backported down to 4.7.36

A self-contained Docker lab to understand and defend against this vulnerability. It replicates the original write-up's scenario: an anonymous visitor leaves a comment; when someone with an admin session simply views the page, the payload executes in their browser and escalates to command execution on the server (hence Comment2Shell).

It also contributes something new to the field (verified with real execution, not described in the write-up): the same chain works via contributor POST content — the surface is not only comments (make post2shell, details in research/HALLAZGOS.md, Spanish).

Everything runs on your machine against your own containers. Nothing here is to be used against third-party systems.

<!-- The full payload (with a REAL newline inside cite) -->
<blockquote cite="a
b"><code>x" onfocus=alert(document.domain) autofocus tabindex=0</code></blockquote>

(Full Spanish README with extra details: README.md)


Quickstart

make lab          # victim WP 7.1.0 at http://localhost:8080 (admin / lab-admin-2026)
make plant        # phase 1: anonymous comment with the payload
make view         # phase 2: HTML served to the admin -> verdict (live/inert)
make demo-flip    # phase 3: root-cause with the REAL 7.1.0 vs 7.1.1 code
make rce          # phase 5: XSS->RCE (nonce -> plugin upload -> id)
make post2shell   # phase 6 (CONTRIBUTION): contributor-post vector, victim vs control
make landing      # serves the landing at :8090 (also published at https://686f6c61.github.io/POC-WP-CORE-CVE-2026-93485/)
make clean        # destroy everything

Full demo (includes the WP 7.1.1 patched negative control at :8081):

make full-demo

Check it in your own browser (direct): after make plant, log in at http://localhost:8080/wp-admin (admin / lab-admin-2026) and open the post — you will see the document.domain alert without clicking anything. On the control (:8081, WP 7.1.1) the same comment is inert text.

Requirements: Docker + docker compose, curl, python3, make.

The vulnerability in 4 steps

The bug lives in the gap between sanitization and rendering of comment content:

StepWhat happensWhere
1. PlantThe comment passes wp_kses_post. The allowlist permits blockquote[cite] and <code>. kses re-encodes & < > ' " in attribute values, but not the newline -> cite="a\nb" survives, and the raw quote inside <code> is legal text.wp-includes/kses.php
2. wpautop breaks the tagAt render time wpautop protects \n inside tags with an <!-- wpnl --> placeholder… which contains a >. The regex at line 563 |<p><blockquote([^\>]*)|i is not quote-aware: its capture stops at that internal > and injects ><p> in the MIDDLE of the cite value.wp-includes/formatting.php:563
3. wptexturize curls the quoteThe wptexturize pass over the final template HTML (get_the_block_template_html() -> block-template.php:297) turns cite's closing quote into &#8221; (the attribute stays "open") because the injected <p> acts as a tag boundary; but it respects the raw quote inside <code> (exclusion list pre, code, kbd, style, script, tt).template pass, after wpautop
4. The browser executesFor the browser, the cite value now extends to the quote inside <code>x". Everything after — onfocus=…, autofocus, tabindex=0 — becomes real attributes of the <blockquote>. tabindex=0 makes it focusable and autofocus fires onfocus on load: zero-click XSS.visitor/admin browser

The RCE escalation (phase 5) is the one from the write-up: with the admin session, the JS fetches /wp-admin/plugin-install.php?tab=upload, extracts _wpnonce, builds an in-memory ZIP with a one-line plugin and uploads it to update.php?action=upload-plugin. No activation needed: plugin files are directly reachable under /wp-content/plugins/.

The patch (one line)

-		$text = preg_replace( '|<p><blockquote([^>]*)>|i', '<blockquote$1><p>', $text );
+		$text = preg_replace( '!<p><blockquote((?:[^>"\']|"[^"]*"|\'[^\']*\')*)>!i', '<blockquote$1><p>', $text );

The new pattern only crosses quotes as complete pairs ("…"), so the match ends at the tag's real >. Full forensic analysis in research/PARCHE.md (Spanish).

Links: patch commit (b05c380) · full diff 7.1…7.1.1 · tag 7.1.1 · WordPress releases

The diff also includes a second security change. Besides line 563, 7.1.1 hardened WP_HTML_Tag_Processor::set_modifiable_text() (class-wp-html-tag-processor.php:3991: /--!?>/ -> /^-?>|--!?>/ for HTML comment data). It is not on kses's read path and public CVE coverage doesn't mention it — documented as part of our patch forensics (HALLAZGOS §5, Spanish).

Our contribution: the surface is not only comments ("Post2Shell")

The write-up and the CVE describe the vector through the anonymous comment form. But the root cause — kses keeps inside attribute values + wpautop line 563 + template-level wptexturize pass — is not comment-specific: it also occurs on the_content of any post whose author lacks unfiltered_html (contributor/author), since their content is sanitized with wp_filter_post_kses on save and rendered through the same pipeline.

Verified in this lab (make post2shell on victim and control):

  • WP 7.1.0: an authenticated contributor publishes a post with the same payload (saved through THEIR kses) -> served HTML shows the same broken transformation and onfocus executes real JavaScript in headless Chrome (DOM marker data-c2s-post="XSS-EN-POST-DE-COLABORADOR").
  • WP 7.1.1: the same post stays inert — line 563 is shared by every wpautop path, so the patch covers both vectors.

Implications: "Comment2Shell" is also "Post2Shell" (attacker needs an authenticated contributor instead of nobody — less severe, more people to watch); IOCs must include post_content from low-trust users, not just wp_comments; and "are comments open?" is the wrong question — sites with closed comments but open contributor registration remain exposed unpatched.

Evidence gallery

Real lab captures (regenerate with make capturas; the browser shots use a visible-effect variant of the same payload). Full captions in README.md.

WP 7.1.0 — XSS fires on page loadWP 7.1.1 — inert
Victim: page repainted by the payloadControl: normal page, payload as text
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →