Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
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
CVE-2026-105950 — Bilingual PoC and technical analysis of CVE-2026-105950, a Formwork CMS formaction URI sanitizer bypass enabling stored XSS, with reproducible vulnerable/patched Docker tests. | Kitploit
Tools/GitHubGitHub/capivara-research/cve-2026-105950
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLearning & Education
GitHubcapivara-research/cve-2026-105950

CVE-2026-105950

Bilingual PoC and technical analysis of CVE-2026-105950, a Formwork CMS formaction URI sanitizer bypass enabling stored XSS, with reproducible vulnerable/patched Docker tests.

View RepositoryWebsite
23 days agoNot yet reviewed
Share

CVE-2026-105950 — Formwork formaction URI sanitizer bypass

English | Português do Brasil

CVE GHSA

Proof of concept and technical analysis for a stored cross-site scripting vulnerability in Formwork CMS. The vulnerability was discovered and responsibly disclosed by Fernando Viana (capivara-research).

This repository is organized as a learning path: understand the bug, reproduce the sanitizer bypass safely, compare vulnerable and fixed behavior, and only then study the end-to-end impact.

At a glance

ItemDetail
VulnerabilityStored XSS through a URI-sanitizer bypass
WeaknessCWE-79
Attack surfaceformaction on an allowed HTML element
AttackerAuthenticated page editor
Victim actionClick the crafted form control
Security boundaryHtmlSanitizer / DomSanitizer::sanitizeNodeAttribute()
Default exposureRaw HTML in Markdown must be enabled
Upstream severityMedium, CVSS 3.1 5.4
FixUpgrade to 2.3.13 or later

Official CVE record: CVE-2026-105950

Summary

Formwork's HTML sanitizer allowed the URI-valued formaction attribute but, in versions through 2.3.12, did not include it in the set of attributes subjected to URI-scheme validation. Consequently, an authenticated content editor could store a javascript: URI when raw HTML in Markdown fields was enabled. A victim clicking the crafted button caused attacker-controlled JavaScript to run in the Formwork origin.

Affected versions

ProductAffectedFixed
getformwork/formwork2.0.0–2.3.122.3.13

Preconditions

  • pages.content.allowHtml is enabled (disabled by default).
  • The attacker has an authenticated role capable of editing pages.
  • A victim visits the affected page and clicks the crafted control.

Root cause

formaction appeared in HtmlReference::ALLOWED_ATTRIBUTES, but was absent from HtmlReference::URI_ATTRIBUTES. DomSanitizer::sanitizeNodeAttribute() only applied URI-scheme validation to attributes in the latter list, allowing the dangerous value to survive sanitization.

The distinction matters:

ListQuestion answeredVulnerable behavior
ALLOWED_ATTRIBUTES“May this attribute remain in the HTML?”Yes, formaction was allowed.
URI_ATTRIBUTES“Must this value be checked as a URI?”No, formaction was missing.
Allowed URI schemes“Is the URI scheme safe?”Never reached for formaction.

formaction overrides the destination of the surrounding form for the specific submit control. Browsers also interpret the javascript: scheme as executable code. The sanitizer therefore had to validate both facts together; allowing the attribute without classifying it as URI-bearing created the bypass.

editor-controlled Markdown
  -> Markdown parser with raw HTML enabled
  -> HtmlSanitizer
  -> formaction is allowed but not URI-validated
  -> persistent page HTML
  -> victim click
  -> JavaScript executes in the site origin

Why the payload works

<button
  id="trigger"
  formaction="javascript:void(document.getElementById('result').textContent='FORMWORK_XSS_EXECUTED')">
  Trigger PoC
</button>
FragmentPurpose
<button>Creates the user-interactive form control.
formaction=Selects a submission target for this button.
javascript:Asks the browser to evaluate script instead of navigating to HTTP(S).
void(...)Prevents the expression result from replacing the document.
textContent=...Provides visible, non-exfiltrating proof of execution.

The basic payload deliberately does not read cookies, make network requests, or alter server-side state.

Minimal PoC

Use only in a disposable, authorized lab. The payload changes text in the current page and does not exfiltrate data.

Save the contents of payloads/basic.md in a Formwork page on version 2.3.12 with raw HTML enabled, publish it, then click Trigger PoC.

Expected vulnerable result:

FORMWORK_XSS_EXECUTED

The standalone sanitizer reproducer can be run from an extracted Formwork tree:

php poc.php /path/to/formwork-2.3.12

Expected result on 2.3.12:

[VULNERABLE] javascript: URI survived sanitization

On 2.3.13 or newer, the dangerous attribute is removed and the script reports [PATCHED].

Reproducible Docker comparison

Docker is optional, but removes host dependency differences. The version is explicit so readers can compare the same test against both sides of the patch:

# Vulnerable control: expected to print [VULNERABLE] and exit 1
docker build --build-arg FORMWORK_VERSION=2.3.12 -t cve-2026-105950:vulnerable .
docker run --rm cve-2026-105950:vulnerable

# Patched control: expected to print [PATCHED] and exit 0
docker build --build-arg FORMWORK_VERSION=2.3.13 -t cve-2026-105950:patched .
docker run --rm cve-2026-105950:patched

Why test both versions? A single positive result can be caused by a flawed harness. Reusing the same input and runner against the first fixed release makes the upstream patch the only intended variable.

Interpreting the result

OutputExit codeMeaning
[VULNERABLE]1The dangerous URI survived sanitization.
[PATCHED]0The dangerous URI was removed or neutralized.
Usage/error message2The test environment is incomplete or the path is wrong.

End-to-end impact

The same-origin XSS was previously validated in an isolated local installation with a real Chromium click. In that test, JavaScript used the administrator's authenticated browser session to fetch the user-management page, obtain its CSRF token, and submit Formwork's real new-user form. The application persisted a new account with the admin role even though the attacking editor did not have panel.users.create permission.

The laboratory-only payload is included at payloads/admin-chain.md. It creates a persistent administrator account and must never be used outside a disposable authorized environment.

Why CSRF and HttpOnly do not stop this chain

  • HttpOnly prevents JavaScript from directly reading the session cookie, but the browser still attaches it to same-origin requests.
  • A CSRF token protects against a different origin that cannot read the application response. Same-origin XSS can fetch the form and read the fresh token from its HTML.
  • The server therefore receives a valid session cookie, a valid CSRF token, and valid form fields. From its perspective, the request comes from the victim.

This does not mean those controls are ineffective; it shows why preventing same-origin script execution remains essential.

Repository map

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.

    899
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    831
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    661
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

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

    443
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    395

Explore all tools

Browse our collection of tools

View all tools →