Media

JupyterLab: Cross-site scripting (XSS) in JupyterLab via crafted language package (jupyterlab.json)

  • Publicada: 01.10.2026
  • Actualizado: 11.10.2026 15:18

Description

A language pack ships a Plural-Forms header saying how the language counts, for example nplurals=2; plural=(n != 1);. JupyterLab turns that string into a function with new Function, so the header gets executed. The check that meant to keep it safe was a regular expression. The regex was anchored at the start but not at the end, so it accepted any string that began with a valid plural rule and ignored everything after it.

A header such as the following passed the check, and the part after the plural rule ran in the JupyterLab page as soon as the first plural string was translated:

nplurals=2; plural=(n > 1); <anything here ran as JavaScript>

Users are affected if all of the following are true:

  • they run JupyterLab 3.0.0 through 4.6.3, or an application that bundles it such as Notebook 7;
  • a language pack they did not write is installed in the environment; and
  • that language is selected, so its catalogue is loaded

An installation using the default English locale loads no catalogue and is not affected.

CVE assignment pending, GitHub CNA is experiencing severe backlog

Impact

The code in the header ran in the JupyterLab page, in the same origin and session as the authenticated user. It could call the Jupyter Server REST API as that user: read and write any file under the server root, start a kernel and run code in it, and open a terminal where terminals are enabled. Nothing had to be clicked; translating one plural string was enough, and that happens during normal use of the interface.

What this changes is who has to be trusted. A language pack is a Python package, and installing one is already a privileged act, so an attacker who can get any package installed has server-side code execution regardless of this issue. The header is different because it is catalogue metadata: it travels with translation content, through the translation pipeline that carries strings from Crowdin into the language packs, and it is reviewed as text rather than as code. Anyone able to change a catalogue, or to publish a pack under a name someone installs, got JavaScript execution in every browser that selected that language.

Note: the impact is much more limited on JupyterLite which typically does not have access to most of the surfaces that this flaw exposes.

Patches

JupyterLab v4.6.4 and v4.5.11 contain the patch. The check now has to match the whole header, so a plural rule followed by anything else is rejected and no function is built from it.

JupyterLab 3.x reached end of life and receives no patch. Its users should move to a supported 4.x release.

Users of applications that depend on JupyterLab, such as Notebook v7+, should update jupyterlab package too.

Workarounds

Use the English locale, which loads no catalogue:

bash
jupyter lab --LabApp.default_locale=en

or the following traitlet:

python
c.LabApp.default_locale = 'en'

Everyone then sees the interface in English, whatever language they had selected.

To check what is installed instead of switching, report any pack whose header carries more than a plural rule:

bash
python -c "
import re
from jupyterlab_server.translation_utils import get_language_packs, get_language_pack
ok = re.compile(r'\s*nplurals\s*=\s*\d+\s*;\s*plural\s*=[\s\-?|&=!<>+*/%:;n0-9_()]+')
packs, _ = get_language_packs()
for locale in packs:
    data, _ = get_language_pack(locale)
    for domain, catalog in (data or {}).items():
        header = catalog.get('', {}).get('plural_forms')
        if header and not ok.fullmatch(header):
            print('SUSPECT', locale, domain, repr(header))
"

The command prints nothing when every catalogue is sound. A line of output names the pack to remove.

Software afectado

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

PlataformaPaqueteVersiones vulnerablesCorregida en
Python (PyPI) jupyterlab >= 3.0.0, < 4.5.11, >= 4.6.0, < 4.6.4 4.5.11, 4.6.4
Python (PyPI) jupyterlite-core < 0.8.4 0.8.4

Referencias

Puntuación CVSS 6.8/10
Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Debilidad (CWE)
CWE-625, CWE-79, CWE-94
Plataforma
Python (PyPI)
Paquete
jupyterlab, jupyterlite-core
Publicada
01.10.2026
Actualizado
11.10.2026 15:18

Fuentes y licencias

OSV / GitHub Advisory Database - PYSEC-2026-4056 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-3jqq-pw4j-pqcj - CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2026-4059 - PyPA Advisory Database; CC BY 4.0

Historial de vulnerabilidades: jupyterlab

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

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

Distribución por gravedad

  • Crítica 1
  • Alta 8
  • Media 8
  • Baja 2

Divulgaciones por año

  1. 2021: 1
  2. 2022: 0
  3. 2023: 0
  4. 2024: 4
  5. 2025: 1
  6. 2026: 13
Gravedad:
  1. JupyterLab: Cross-site scripting (XSS) in JupyterLab via crafted language package (jupyterlab.json) esta entrada
    Media · 6.8 CVE-2026-102830 >= 3.0.0, < 4.5.11, >= 4.6.0, < 4.6.4 4.5.11, 4.6.4
  2. Alta · 8.1 CVE-2026-102831 >= 4.5.0, < 4.5.11, >= 4.6.0, < 4.6.4 4.5.11, 4.6.4
  3. Alta CVE-2026-73417 >= 4.6.0, < 4.6.2, >= 3.3.0, < 4.5.10 4.6.2, 4.5.10
  4. Alta CVE-2026-73415 >= 4.6.0, < 4.6.2, < 4.5.10 4.6.2, 4.5.10
  5. Alta · 7.6 CVE-2024-43805 < 3.6.8, >= 4.0.0, < 4.2.5 3.6.8, 4.2.5
  6. Alta · 7.6 CVE-2024-22421 >= 4.0.0, < 4.0.11, < 3.6.7 4.0.11, 3.6.7

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.