Default `rehype-harden` config allows images from any origin — enables markdown-image exfiltration in AI chat UIs
メンテナーはふだん 1 日以内に返信
@Louayzouaoui1 がすでに取り組んでいます。
2026年10月6日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- security
調査の方向性
Start by tracing the shipped rehype-harden configuration in dist/chunk-YOKDWASOASOASO.js and locating its source configuration. Review how allowedImagePrefixes, allowedLinkPrefixes, allowedProtocols, allowDataImages, defaultOrigin, and rehypeRaw are exposed, then check the security documentation. Done means the default behavior or its documented opt-in configuration clearly addresses remote-image exfiltration and raw HTML handling.
索引モデルが issue の本文から書いたものです。
説明
Version: streamdown 2.6.0 (via AI Elements MessageResponse)
What the shipped defaults are (read from dist/chunk-YOKDWASO.js, not from a repro):
rehypePlugins: {
raw: rehypeRaw,
sanitize: [rehypeSanitize, schema],
harden: [harden, {
allowedImagePrefixes: ["*"],
allowedLinkPrefixes: ["*"],
allowedProtocols: ["*"],
allowDataImages: true,
defaultOrigin: undefined,
}],
}
Why this matters for the use case Streamdown targets. Streamdown renders LLM output. When a
model's context contains attacker-controlled text (a fetched web page, a tool result, a stored
record), prompt injection can make the model emit
. With allowedImagePrefixes: ["*"]
the browser requests that URL as soon as the message renders, with no user action — the
markdown-image exfiltration pattern publicly reported against several AI chat products and
usually mitigated by restricting image origins. rehype-harden's own
purpose is exactly this restriction, but the default config turns it off, and the README
advertises "Security-first — built with rehype-harden", so integrators reasonably assume the
default is restrictive.
rehypeRaw being on by default widens the same surface (raw <img> / <a> are parsed, then
sanitized by the GitHub schema, which keeps src/href).
Ask (any of these would help):
- Ship a restrictive default for images (e.g. same-origin /
defaultOrigin-relative only, or
no remote images) and let apps opt in to["*"]. - If
["*"]stays the default, document it prominently in the security section as a
deliberate choice, with the recommended config for AI-chat apps. - Document how to turn off
rehypeRawwhile keeping the other defaults.
Happy to test a change.
- 主要言語
- TypeScript
- スター
- 5.7k
- フォーク
- 319
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 30
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel/streamdown のほかの issue
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has math対応中かも @orinnz が 29 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
vercel/streamdown#652 ·
メンテナーはふだん 1 日以内に返信
-
allowedTags: a self-closing custom tag at the end of a line turns every later blank line into `<!---->` (preprocessCustomTags)対応中かも @ahmedriad1 が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
vercel/streamdown#706 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
vercel/streamdown#699 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
The word-fade engine ships with every app, whether or not it animates対応中かも @xyrolle が 16 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
vercel/streamdown#681 ·
メンテナーはふだん 1 日以内に返信
-
Mermaid's UI ships in the main bundle although the chart is lazy-loaded対応中かも @xyrolle が 16 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
vercel/streamdown#679 ·
メンテナーはふだん 1 日以内に返信
vercel/streamdown の issue をすべて見る
似ている issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
🎙️ task - drop the raw `./node_modules/.bin/rhachet roles boot` line from bhuild's feedback templateオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ehmpathy/rhachet-roles-bhuild#639 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
redhat-developer/rhdh-plugin-export-overlays#4650 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 13 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
omdsh-dev/DSH-better-sidebar#1098 ·
メンテナーはふだん 2 日以内に返信