CVE-2026-104851 fsspec: Server-Side Template Injection in ReferenceFileSystem leads to Remote Code Execution

High 8.8 Published Updated

Attackers can execute arbitrary Python code by supplying malicious Jinja2 templates in Kerchunk reference JSON documents processed by fsspec.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-104851?

CVE-2026-104851 is a high-severity code injection vulnerability in fsspec filesystem_spec, published on 2 Oct 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

fsspec is a specification and Python implementation framework for filesystem interfaces. From 0.9.0 until 2026.6.0, fsspec.implementations.reference.ReferenceFileSystem evaluates fields from Kerchunk reference JSON documents through unrestricted jinja2.Template(...).render(...) calls in _process_references1._render_jinja, _process_templates, and _process_gen in fsspec/implementations/reference.py. A document supplied inline or fetched from an attacker-controlled URL can provide template expressions that execute Python code when the reference filesystem is opened, including through consumers such as xarray, before referenced data is read. The _process_gen path is reached whenever a document includes a gen array, while the other paths depend on template-related options and values. This issue is fixed in version 2026.6.0.

Weakness: CWE-94, CWE-1336

Which versions are affected by CVE-2026-104851?

3 open source packages ship an affected version, including fsspec.

PackageAffectedFixed in
fsspec PyPIFrom 0.9.02026.6.0
fsspec PyPIFrom 0.9.02026.6.0
fsspec PyPIFrom 0.9.02026.6.0
Linux distribution packages (1)
python-fsspec openSUSE:Leap 16.0All versions2024.3.1-bp160.2.1

How do I fix CVE-2026-104851?

Upgrade fsspec to 2026.6.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-104851 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-104851 exists.

Sources

Also known as CLEANSTART-2026-ER50683, DEBIAN-CVE-2026-104851, ECHO-e799-0dd6-47ec, GHSA-27vj-qcqg-25rc, MINI-3hvw-xjwj-vwfx, MINI-3m3w-jfxf-x2j3 and 17 more.

Is CVE-2026-104851 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free