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
Tools/GitHubGitHub/googlesky/cve-2026-129491
Vulnerability AnalysisExploitationWeb Application ExploitationSecurity VirtualizationWeb SecurityLabs & Practice
GitHubgooglesky/cve-2026-129491

CVE-2026-129491

Reproduction lab and PoC for CVE-2026-129491, a stored XSS in forum-java's comment reply dialog that enables session theft via a non-HttpOnly sid cookie.

View Repository
3 days agoNot yet reviewed
Website
Share

CVE-2026-129491 — forum-java: stored XSS in the comment reply dialog (data-reply-content → jQuery.html())

License: MIT Research status: validated

CVECVE-2026-129491
ComponentQbian61/forum-java — CommentTransfer.toComment (storage), comment-list.html (data-reply-content), posts-script.html ($('#repliedContent').html(dataset.replyContent))
Affected20f7e68 – 63152c49 (the pinned master head; unfixed upstream)
Fixed inno upstream fix at publication time; the fixed side is a hash-checked synthetic remediation (documented as such)
CWECWE-79 (Cross-site Scripting, Stored)
ImpactSession theft + admin takeover: the payload runs when a victim clicks Reply on the attacker's comment; the sid session cookie carries no HttpOnly flag, so document.cookie inside the onerror handler yields a working admin session
VectorNetwork; the attacker needs only a regular account; the comment is published without review
Triggera comment whose content contains ``; the victim's click on Reply

Comment content is stored verbatim and rendered into the reply dialog without sanitizing:

// CommentTransfer.toComment — content stored as-is
return Comment.builder().content(request.getContent()) ...
<!-- comment-list.html — Thymeleaf escapes the attribute, but the browser
     decodes entities for dataset.* -->
<small th:data-reply-content="${comment.content}" class="reply-comment" ...>
// posts-script.html — the click handler
$('.reply-comment').on('click', function (e) {
    $('#repliedContent').html(this.dataset.replyContent);   // ← executes markup
});

This laboratory builds the real forum-java at the pinned commit 63152c49 against MySQL 8 with the upstream seed, walks the full chain, and — since the execution requires the victim's click — additionally proves the two halves that make the click sufficient: the exact string jQuery.html() receives parses into an executable img onerror event, and the sid cookie the payload would read is verifiably not HttpOnly.


1. Root cause

Three facts compose:

  1. verbatim storage — CommentTransfer.toComment saves the request content unchanged;
  2. entity round-trip — Thymeleaf HTML-escapes the attribute, but the DOM restores entities when the browser parses data-* attributes, so dataset.replyContent holds the attacker's raw HTML;
  3. HTML sink — the click handler passes the value to jQuery.html(), which parses and executes it.

The session cookie set after login (sid) has Path=/ and no HttpOnly, so the in-origin script reads it; the admin REST endpoints accept the cookie directly — the advisory demonstrates the admin backend opening with the stolen session.

2. Reproduction environment

serviceimagerole
forum-vulncve-2026-129491:vulnforum-java @ 63152c49 (upstream Maven build) against seeded MySQL 8
forum-fixedcve-2026-129491:fixedsame build + lab/patch-fixed.py (hash-checked): content HTML-escaped at storage
forum-db-vuln / forum-db-fixedmysql:8.0upstream schema.sql + data.sql (SET NAMES utf8mb4 applied); admin password set to Admin@12345 per the advisory
poccve-2026-129491-poc:localstdlib-only Python driver

3. Running the environment

./run-lab.sh build     # mvn package at the pinned commit (both trees)
./run-lab.sh up        # cve129491lab network: two app+db stacks
./run-lab.sh sweep     # check / exploit / probe / mitigation on both sides
./run-lab.sh down

4. The PoC

poc/poc.py (stdlib only; mirrors the advisory's chain):

  • check — register attacker → publish → payload comment → fetch the article page → extract data-reply-content → decode like the browser → simulate the jQuery.html() parse with html.parser and look for executable events. Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.
  • exploit — prints the exact string .html() receives, the simulated parse event, and the session-theft precondition (admin login's Set-Cookie — sid present, HttpOnly: false).
  • probe — payload variants (img onerror / svg onload / plain markup) through the same pipeline.
  • mitigation — no upstream fix; the fixed container is the form a fix takes (escape at storage / use .text() / HttpOnly on sid).

5. Expected results

runforum-vuln (63152c49)forum-fixed (synthetic)
checkparse events: img onerror -> …document.cookieno executable tag
exploit sink string``&lt;img …&gt; (inert)
exploit preconditionsid present, HttpOnly false(same flag; sink inert)
probe img / svg / plainexecutable / executable / inertall inert

Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/versions.txt, evidence/0day-sweep.txt.

6. Environment preconditions

  • Podman (or Docker) with network-creation rights; every container bounded on the isolated cve129491lab network.
  • Outbound HTTPS at image build (GitHub: forum-java; Maven Central). The Maven build takes several minutes.
  • The click-time execution itself is demonstrated in the advisory's screenshots; this laboratory proves the complete delivery path and the cookie precondition deterministically.

7. Additional findings (0-day sweep on the fixed line)

The payload-variant matrix is the surface sweep (evidence/0day-sweep.txt): on the remediated build nothing executable reaches the sink; on the shipped build both active variants parse as events. No second delivery form was found beyond the reply dialog.

8. Repository layout

README.md             this write-up
run-lab.sh            environment driver (build / up / sweep / down)
Makefile              convenience targets
poc/poc.py            the PoC (check / exploit / probe / mitigation)
poc/Dockerfile        runner image (python:3.12-alpine)
lab/lab.Dockerfile    multi-stage build (forum-java @63152c49, both trees)
lab/patch-fixed.py    the hash-checked synthetic remediation
lab/mysql-init/       upstream schema + data seed (gitignored)
evidence/             captured runs of every mode on both sides
TRACKING.md           excluded (working record)

9. References

  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-129491
  • Advisory — https://vul.yulun.ac.cn/20261115/forum-java/
  • forum-java — https://github.com/Qbian61/forum-java (issue #25)
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.

    960
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    554
  • 3

    redforge

    cybersecurity91/redforge

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

    349
  • 4

    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.

    343
  • 5

    ARTEX

    baarai/artex

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

    323
  • 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.

    295

Explore all tools

Browse our collection of tools

View all tools →