Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/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.

查看仓库
120天前尚未审核
分享
网站
内容在请求的语言中不可用。显示英文版本。

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.
下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    594
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    387
  • 4

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    322
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    308
  • 6

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    275

探索所有工具

浏览我们的工具集合

查看所有工具 →