Default `rehype-harden` config allows images from any origin — enables markdown-image exfiltration in AI chat UIs
Los mantenedores suelen responder en 1 día
@Louayzouaoui1 ya está trabajando en esto.
Desde el 6/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- security
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5.7k
- Forks
- 307
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel/streamdown
-
`mode="static"` parses the whole document twice on mount (since the caret host in 2.7)Posiblemente ocupada @akhil9tiet la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vercel/streamdown#673 · 3 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has mathPosiblemente ocupada @orinnz la tomó hace 13 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
vercel/streamdown#652 ·
Los mantenedores suelen responder en 1 día
-
`data-*` and `aria-*` props passed to `<Streamdown>` are never set on its root elementPosiblemente ocupada @xyrolle la tomó hace 1 día. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
vercel/streamdown#675 ·
Los mantenedores suelen responder en 1 día
-
CJK autolink boundary handling keeps `**` in the URL when a bold URL is followed by CJK punctuationPosiblemente ocupada @mikemikimike la tomó hace 1 día. Abiertobug
Dificultad 3/5 Medio día Aptitud para principiantes 50/100
vercel/streamdown#672 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
vercel/streamdown#669 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vercel/streamdown
Issues similares
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
lingdojo/kana-dojo#32590 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bastani-inc/atomic#3703 ·
Los mantenedores suelen responder en 1 día
-
backend bug difficulty: medium priority: medium reliability
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
trustflow-protocol/trustflow-backend#730 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
firecrawl/firecrawl-mcp-server#548 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día