GHSA-3jqq-pw4j-pqcj: XSS

Published Oct 1, 2026
·
Updated

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.defaultlocale=en

or the following traitlet:

python c.LabApp.defaultlocale = '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 jupyterlabserver.translationutils import getlanguagepacks, getlanguagepack ok = re.compile(r'\snplurals\s=\s\d+\s;\splural\s=[\s\-?|&=!<>+/%:;n0-9()]+') packs, = getlanguagepacks() for locale in packs: data, = getlanguagepack(locale) for domain, catalog in (data or {}).items(): header = catalog.get('', {}).get('pluralforms') 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.

Affected Software

3 affected componentsFixes available
pip/jupyterlite-core<=0.8.3
0.8.4
pip/jupyterlab>=3.0.0<=4.5.10
4.5.11
pip/jupyterlab>=4.6.0<=4.6.3
4.6.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/jupyterlite-core to a version that resolves this vulnerability.

    Fixed in 0.8.4
  2. Upgrade

    Upgrade pip/jupyterlab to a version that resolves this vulnerability.

    Fixed in 4.5.11
  3. Upgrade

    Upgrade pip/jupyterlab to a version that resolves this vulnerability.

    Fixed in 4.6.4
  4. Upgrade

    Upgrade jupyterlab to a version that resolves this vulnerability.

    Fixed in 4.6.4
  5. Upgrade

    Upgrade jupyterlab to a version that resolves this vulnerability.

    Fixed in 4.5.11
  6. Configuration

    Use the English locale so no language catalogue is loaded: set c.LabApp.default_locale = 'en' or start JupyterLab with --LabApp.default_locale=en.

    JupyterLab LabApp.default_locale = en

Event History

Oct 1, 2026
Advisory Published
via GitHub·03:22 PM
Data Sourced
via GitHub·03:22 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Are installations using the default English locale affected?

No. The default English locale loads no catalogue, so it is not affected.

2

Which deployments are in scope?

JupyterLab versions 3.0.0 through 4.6.3 are affected, including applications that bundle JupyterLab such as Notebook 7. The listed software also includes pip/jupyterlite-core.

3

What must occur for code execution to be triggered?

A language pack not written by the user must be installed, that language must be selected so its catalogue is loaded, and a plural string must be translated. The malicious content in the Plural-Forms header then executes in the JupyterLab page.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203