llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · inscriptis

GHSA-4WXF-43CV-CFXX

A CSS length in a style attribute drives an unbounded string allocation

Sin parche publicado
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición52 dDesde la divulgación, 29 sept 2026, 1:02 p. m.
Detección52 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (media) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Parche en la próxima ventana y listo, campeón.Calma, café y gestión de vulnerabilidades.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
29 sept 26
21 nov 26
29 sept 26
12 oct 26
26 oct 26
8 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4WXF-43CV-CFXX divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

`get_text()` runs on untrusted HTML under the default config, and it's the documented way to
use inscriptis. A CSS length in a `style` attribute on a block element gets turned into an
integer and then used straight away as a repeat count for the string inscriptis emits, with no
upper bound. So a ~40 byte document can force a multi-gigabyte allocation and take the process
down with a `MemoryError`.

Proof of concept

Installed from PyPI with `pip install inscriptis==2.7.4`:

from inscriptis import get_text

get_text('<p style="margin-top:2000000000em">x</p>')

The value goes through `CssParse._get_em`, which returns `round(2000000000)` untouched, into
`Canvas.open_block`, which runs `"\n" * (required_newlines - 1)` and tries to build a two
billion character string. Under a 1 GiB address-space limit that raises `MemoryError`; with no
limit it eats all the host memory.

Output length just tracks the number in the style value, so it scales with the digits you type
rather than the size of the input:

<p style="margin-top:10000000em">x</p>    ->  ~10 MB output,  38 byte input
<p style="margin-top:2000000000em">x</p>  ->  ~2 GB attempt,   40 byte input

Impact

Anything that runs `get_text()` or `get_annotated_text()` on HTML it doesn't control can be
crashed by one small request, no auth needed. Converting scraped or user-submitted HTML is what
the library is for, so that input is untrusted by default.

`margin-top`, `margin-bottom`, `padding-left` and the `margin-before`/ `padding-start` aliases
all reach the same spot. Units other than `em`/ `rem`/ `qem` get divided by 8 but still allocate
at the same order of magnitude.

Issue #63 added `suppress(ValueError)` around these handlers, so a malformed value is caught, but
a valid oversized one isn't. As far as I can see `_get_em` has never capped the magnitude.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
inscriptis≤ 2.7.4
2.7.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
PyPIinscriptis
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/weblyzard/inscriptis/security/advisories/GHSA-4wxf-43cv-cfxx

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.