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
CVE-2026-120218 — Analysis and safe PoC for CVE-2026-120218, a stored XSS in TypeMill's SVG sanitizer via xml-stylesheet XSLT processing instructions, with source checker and fix details. | Kitploit
Tools/GitHubGitHub/capivara-research/cve-2026-120218
Static AnalysisWeb Vulnerability ScannersVulnerability AnalysisExploitationWeb SecurityPapers & Research
GitHubcapivara-research/cve-2026-120218

CVE-2026-120218

Analysis and safe PoC for CVE-2026-120218, a stored XSS in TypeMill's SVG sanitizer via xml-stylesheet XSLT processing instructions, with source checker and fix details.

View Repository
120 days agoNot yet reviewed
Website
Share

CVE-2026-120218 — TypeMill stored XSS via SVG XSLT processing instruction

English | Português do Brasil

CVE VulDB VulDB Submit GHSA Fixed License

Technical analysis, safe proof-of-concept material, and reproducible source checks for a stored cross-site scripting vulnerability in TypeMill's SVG sanitizer.

[!IMPORTANT] VulDB assigned CVE-2026-120218 on October 31, 2026. At the time this repository was prepared, the CVE Program API had not yet published the canonical record and returned CVE_RECORD_DNE. VDB-429569 is the current public assignment source. This notice should be removed when the CVE record becomes available.

At a glance

FieldValue
ProductTypeMill CMS
Verified affected range2.6.0 through 2.26.0
Tested releasev2.26.0 (050cc875a3fcb9de5abc8da08b89895bdfea7865)
Fixed version2.27.0
Security fix9ca43c4
Componentsystem/typemill/Models/SvgSanitizer.php
WeaknessCWE-79 — Improper Neutralization of Input During Web Page Generation
Required privilegeAuthenticated contributor or another role with mycontent:create
ConfigurationAllow svg must be enabled
User interactionA privileged user opens a direct stored SVG URL
VulDB scoreCVSS 3.1 3.5
Researcher assessmentCVSS 3.1 8.7 — scope changed, high confidentiality/integrity impact
ResearcherFernando Viana — Capivara Research

Executive summary

TypeMill versions containing the vulnerable sanitizer checked SVG elements and attributes against allowlists, but did not inspect XML processing instructions. An authenticated contributor could upload a document containing an xml-stylesheet instruction whose XSLT generated HTML and JavaScript.

The processing instruction survived sanitization, publication, and storage. TypeMill then served the document from the application origin as image/svg+xml. When a privileged user opened the direct Live, Original, or Thumb URL in a browser with SVG XSLT support, the transformed JavaScript ran with the TypeMill origin.

The coordinated local validation crossed the contributor-to-administrator trust boundary: same-origin JavaScript used the administrator's existing session to create a harmless marker account. The public PoC is deliberately safer. It only changes text inside its own document and sets a DOM attribute; it does not access cookies, call application APIs, or send network requests.

Why this matters

Stored XSS is not limited to stealing a readable cookie. JavaScript executing in the application's origin can make authenticated same-origin requests, even when the session cookie is HttpOnly. The browser attaches the victim's session automatically.

In the validated chain, the attacker starts with content-level privileges while the victim has administrative privileges:

contributor uploads crafted SVG
                |
                v
TypeMill checks elements and attributes only
                |
                v
xml-stylesheet processing instruction survives
                |
                v
SVG is published as same-origin image/svg+xml
                |
                v
administrator opens a direct media URL
                |
                v
XSLT emits JavaScript in the TypeMill origin
                |
                v
script can perform actions authorized to the administrator

Preconditions and limits

All of the following are required for the demonstrated chain:

  1. An administrator or manager enables TypeMill's Allow svg option. It is disabled by default.
  2. The attacker controls an authenticated contributor account, or another account with mycontent:create.
  3. The SVG is uploaded and published through the normal image workflow.
  4. A privileged user opens the direct SVG resource, rather than viewing it only through an `` element.
  5. The victim's browser processes SVG XSLT stylesheets. Browser support varies and continues to change.

These conditions reduce exposure but do not make the sanitizer bypass safe. SVG upload is an official feature, the sanitizer is a security boundary, and the media interface exposes direct links to the stored resources.

Root cause

The affected SvgSanitizer used DOMDocument::getElementsByTagName("*") to enumerate XML elements:

$allElements = $this->xmlDoc->getElementsByTagName("*");

for ($i = 0; $i < $allElements->length; $i++) {
    $currentNode = $allElements->item($i);
    // Element and attribute allowlist checks.
}

An XML processing instruction is a DOMProcessingInstruction, not a DOM element. It is absent from that list and therefore survives the allowlist pass and later saveXML() serialization:

<?xml-stylesheet type="text/xsl" href="data:text/xsl;base64,..."?>

The self-contained data URI avoids any dependency on an attacker-controlled server or a second uploaded file.

Vulnerable data flow

  1. POST /api/v1/image accepts image data for accounts authorized with mycontent:create.
  2. The contributor role receives that permission through TypeMill's role configuration.
  3. ControllerApiImage::saveImage() preserves the SVG format when allowsvg is active.
  4. Media::checkAllowedExtension() invokes SvgSanitizer.
  5. The sanitizer checks elements and attributes but misses the processing instruction.
  6. PUT /api/v1/image publishes the generated media files.
  7. The stored SVG is served from the TypeMill origin as active XML.

Safe reproduction

The poc/ directory contains:

  • check_source.py, a read-only source checker;
  • sanitizer_repro.php, a direct harness for TypeMill's real sanitizer;
  • payload.svg, a harmless and self-contained browser marker; and
  • a step-by-step laboratory guide.

Static check

python3 poc/check_source.py /path/to/typemill

The checker exits with:

CodeMeaning
0All controls introduced by the 2.27.0 fix are present
1One or more controls are absent; the source matches the vulnerable pattern
2Invalid path or usage error

Containerized vulnerable-source check

docker build -t cve-2026-120218 .
docker run --rm cve-2026-120218

The image pins the official v2.26.0 tag. Its wrapper treats detection of the expected vulnerable pattern as a successful container test.

Direct sanitizer check

In a TypeMill source tree with its PHP dependencies available:

php poc/sanitizer_repro.php \
  /path/to/typemill \
  poc/payload.svg \
  /tmp/payload.sanitized.svg

On the vulnerable release, the expected diagnostic is:

Processing instruction survived sanitization.
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.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    593
  • 3

    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.

    371
  • 4

    redforge

    cybersecurity91/redforge

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

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

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

    322

Explore all tools

Browse our collection of tools

View all tools →