Critical Vulnerability in fsspec: Unrestricted Jinja2 Template Execution
Summary
DEBIAN-CVE-2026-104851: fsspec is a specification and Python implementation framework for filesystem interfaces. Affects fsspec versions 2022.11.0-1 – 2025.7.0-4. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
fsspec is a Python library that provides a specification and implementation framework for filesystem interfaces. It allows users to work with various file systems in a unified manner. The library is widely used in data processing applications, including those that utilize xarray for handling large datasets. However, a significant vulnerability has been identified that affects versions from 0.9.0 until 2026.6.0, which could allow malicious users to execute arbitrary Python code through crafted JSON documents.
Vulnerability Detail
The vulnerability arises from the way fsspec handles Kerchunk reference JSON documents. Specifically, it uses unrestricted jinja2.Template(...).render(...) calls in its methods, which can evaluate fields from these documents. An attacker can supply a document either inline or from a URL they control, embedding template expressions that execute Python code when the reference filesystem is opened. This can lead to severe consequences, including unauthorized access to sensitive data or system compromise, especially when used in conjunction with consumers like xarray.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
If immediate updating is not possible, consider restricting access to the JSON documents that are processed by fsspec, ensuring that only trusted sources are used. Additionally, avoid using template-related options that could expose your application to this vulnerability.
Conclusion
The vulnerability in fsspec poses a significant risk due to its ability to execute arbitrary code through crafted JSON documents. It is crucial for users to update to the patched version 2026.6.0 or later to safeguard their applications. Additionally, employing best practices for document handling can help mitigate risks until an update can be applied.
See every vulnerability recorded for fsspec →
FAQ
The CVSS score of this vulnerability is 8.8, indicating a high level of severity.
Versions from 0.9.0 until 2026.6.0 of fsspec are affected by this vulnerability.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.
The potential risks include unauthorized execution of Python code, which can lead to data breaches, system compromise, and other malicious activities.
Yes, you can mitigate the risk by restricting access to the JSON documents processed by fsspec and avoiding the use of untrusted template expressions.
References
Related vulnerabilities
Recent vulnerabilities recorded for fsspec.