REDHAT-BUG-2545294: High severity pypi/fsspec vulnerability
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 processreferences1.renderjinja, processtemplates, and processgen 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 processgen 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
fsspecto a version that resolves this vulnerability.Fixed in 2026.6.0
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications that open Kerchunk reference JSON documents with fsspec's ReferenceFileSystem are exposed when those documents are supplied inline or retrieved from attacker-controlled URLs. Consumers such as xarray can trigger processing before any referenced data is read.
What must an attacker control to exploit it?
An attacker needs to provide or influence a Kerchunk reference JSON document processed by ReferenceFileSystem. Template expressions in that document can execute Python code during filesystem opening; a gen array reaches the affected _process_gen path, while other paths depend on template-related options and values.
Are all affected reference documents equally dependent on template configuration?
No. A document containing a gen array reaches the affected _process_gen path whenever it is processed. The _render_jinja and _process_templates paths depend on template-related options and values.
What version fixes the issue?
The issue is fixed in fsspec version 2026.6.0.