CVE-2026-104851: fsspec Remote Code Execution via Server-Side Template Injection

fsspec Updated 15 Oct 2026

Summary

15/10/2026
Yes i
High
8.8

CVE-2026-104851: fsspec: Server-Side Template Injection in ReferenceFileSystem leads to Remote Code Execution. Affects fsspec versions >= 0.9.0, < 2026.6.0. Fixed in 2026.6.0. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

fsspec is a Python package that provides a unified interface for various file systems, allowing users to interact with local and remote file systems seamlessly. It is widely used in data science and cloud computing environments, particularly for handling large datasets. The package's functionality includes reading and writing files across different storage backends, such as local file systems, cloud storage, and distributed file systems. However, a critical vulnerability has been identified in the ReferenceFileSystem implementation, which can lead to remote code execution due to improper handling of user-supplied JSON documents.

Vulnerability Detail

The vulnerability arises from the way fsspec's ReferenceFileSystem processes JSON documents that contain Jinja2 template strings. Specifically, the package uses un-sandboxed Jinja2 template rendering, allowing an attacker to inject arbitrary Python code through specially crafted JSON. This can occur when a user opens a reference file system pointing to a malicious URL or JSON document. The affected code paths are located in the reference.py file, where the templates are rendered without any security restrictions. The potential ramifications include unauthorized access to the victim's machine, data manipulation, or other malicious activities.

How To Fix

Latest published version: 2026.9.0 as of 22 Oct 2026

pip install --upgrade "fsspec==2026.9.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2026.6.0

This is the first release that contains the fix.

pip install --upgrade "fsspec==2026.6.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the ReferenceFileSystem with untrusted JSON documents or URLs. Ensure that any JSON references are sourced from trusted locations only. Additionally, you can implement a custom template rendering function that uses a sandboxed environment to mitigate the risk of code execution.

Conclusion

The vulnerability CVE-2026-104851 in the fsspec package poses a significant risk due to its potential for remote code execution via server-side template injection. Users are strongly advised to update to the patched version and exercise caution when handling JSON documents from untrusted sources.

See every vulnerability recorded for fsspec →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 8.8, indicating a high severity level.

All versions of fsspec from 0.9.0 onward are affected by this vulnerability.

You can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring access to the code.

If you cannot update fsspec immediately, avoid using the ReferenceFileSystem with untrusted JSON documents or URLs as a temporary measure.

The impact of this vulnerability includes the potential for remote code execution on the victim's machine, leading to unauthorized access and manipulation of data.

Related vulnerabilities

Recent vulnerabilities recorded for fsspec.

How To Fix

Latest published version: 2026.9.0 as of 22 Oct 2026

pip install --upgrade "fsspec==2026.9.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2026.6.0

This is the first release that contains the fix.

pip install --upgrade "fsspec==2026.6.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback