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.
Published: 2026-10-02
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

A template injection flaw exists in the fsspec ReferenceFileSystem implementation. The library blindly evaluates Jinja2 template expressions found in Kerchunk reference JSON files, allowing an attacker to embed arbitrary Python code that is executed when the filesystem is accessed. The flaw can compromise confidentiality, integrity, and availability by running attacker‐trusted commands, reading or modifying local data, or establishing persistence. The weakness is based on unrestricted template evaluation (CWE‑1336) and the injection of code via template rendering (CWE‑94).

Affected Systems

The vulnerability affects all releases of fsspec from version 0.9.0 up to and including 2026.6.0. Any deployment using the ReferenceFileSystem component of the fsspec:filesystem_spec library and loading reference JSON documents—either inline or from a remote URL—without proper filtering may be impacted.

Risk and Exploitability

The CVSS score of 8.8 classifies the issue as high severity. Exploitation requires the ability to supply a crafted reference JSON file that contains Jinja2 expressions; the code is executed automatically when the filesystem is opened, which can happen through direct use or through third‑party consumers such as xarray. No EPSS data is available, but the lack of a KEV listing does not reduce the risk—mission‑critical code execution remains possible, especially in environments that treat reference files as untrusted inputs.

Generated by OpenCVE AI on October 2, 2026 at 17:21 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade fsspec to version 2026.6.0 or later which removes the unsandboxed Jinja2 rendering
  • Verify that all reference JSON documents originate from trusted sources and avoid loading unverified external references
  • When upgrading is not immediately possible, limit the use of ReferenceFileSystem or configure the library to disable templating features if such options exist

Generated by OpenCVE AI on October 2, 2026 at 17:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-27vj-qcqg-25rc fsspec: Server-Side Template Injection in ReferenceFileSystem leads to Remote Code Execution
History

Mon, 05 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sun, 04 Oct 2026 22:15:00 +0000

Type Values Removed Values Added
First Time appeared Fsspec
Fsspec filesystem Spec
Vendors & Products Fsspec
Fsspec filesystem Spec

Sat, 03 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Fri, 02 Oct 2026 16:45:00 +0000

Type Values Removed Values Added
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.
Title fsspec: Server-Side Template Injection in ReferenceFileSystem leads to Remote Code Execution
Weaknesses CWE-1336
CWE-94
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Fsspec Filesystem Spec
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-05T20:03:36.502Z

Reserved: 2026-10-02T14:38:43.244Z

Link: CVE-2026-104851

cve-icon Vulnrichment

Updated: 2026-10-05T20:03:16.024Z

cve-icon NVD

Status : Deferred

Published: 2026-10-02T17:17:03.763

Modified: 2026-10-05T20:17:09.373

Link: CVE-2026-104851

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-02T16:36:48Z

Links: CVE-2026-104851 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-04T20:53:34Z

Weaknesses
  • CWE-1336

    Improper Neutralization of Special Elements Used in a Template Engine

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')