Media

Seroval: Script injection through RegExp sources in serialized output

  • Publicada: 28.10.2026
  • Actualizado: 28.10.2026 23:17

Summary

seroval writes a RegExp as a regular expression literal. In affected versions, the < character in a RegExp source is written without escaping. A source built from untrusted input can then end the HTML <script> element that the serialized output is placed in, and run script in the page.

Details

seroval escapes < in strings, so string values cannot end a <script> element. RegExp sources did not get the same escaping:

  • Versions before 1.0.0 wrote the source as is.
  • Version 1.5.5 stopped escaping < in RegExp sources, so that named groups and lookbehinds keep working. This removed the escaping for every < in a source.

These functions are affected:

  • serialize, serializeAsync
  • crossSerialize, crossSerializeAsync, crossSerializeStream
  • the Serializer class
  • compileJSON

toJSON, fromJSON, toCrossJSON and fromCrossJSON are not affected, because they never produce JavaScript.

Impact

An application is affected when all of these are true:

  1. It builds a RegExp from untrusted input that is used as regular expression syntax. Input passed through an escaping helper (such as an escapeRegExp function) is not enough to exploit this.
  2. It serializes that RegExp with one of the functions above.
  3. It places the output inside an HTML <script> element, as server rendering usually does.

In that case an attacker can run script in the page of any user who receives that output.

Patches

Fixed in 1.6.10. A RegExp whose source contains < is now written with the RegExp constructor and an escaped string source. Named groups and lookbehinds keep working.

Workarounds

If you cannot upgrade:

  • Do not serialize a RegExp built from untrusted pattern syntax. Send its source and flags as strings, and build the RegExp on the client.
  • Or reject patterns that contain < before they reach the serializer.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm seroval >= 1.5.5, < 1.6.10, < 1.0.0 1.6.10, 1.0.0

Referencias

Puntuación CVSS 4.7/10
Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Debilidad (CWE)
CWE-116, CWE-79
Plataforma
npm
Paquete
seroval
Publicada
28.10.2026
Actualizado
28.10.2026 23:17

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-9wx9-5pv9-3349 - CC BY 4.0

Historial de vulnerabilidades: seroval

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (10) en el archivo
Entradas en total
10
Primera → última
01.2026 10.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 2
  • Alta 6
  • Media 2

Divulgaciones por año

  1. 2026: 10
Gravedad:
  1. Seroval: Script injection through RegExp sources in serialized output esta entrada
    Media · 4.7 CVE-2026-116582 >= 1.5.5, < 1.6.10, < 1.0.0 1.6.10, 1.0.0
  2. Alta · 7.5 CVE-2026-24006 < 1.4.1 1.4.1
  3. Alta · 7.5 CVE-2026-23957 < 1.4.1 1.4.1
  4. Alta · 7.5 CVE-2026-23956 >= 0.2.0, < 1.4.1 1.4.1
  5. Alta · 7.3 CVE-2026-23736 < 1.4.1 1.4.1

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.