Skip to main content

CVE-2026-104851: CWE-94: Improper Control of Generation of Code ('Code Injection') in fsspec filesystem_spec

0
High
VulnerabilityCVE-2026-104851cvecve-2026-104851cwe-94cwe-1336
Published: 10/02/2026 (10/02/2026, 16:36:48 UTC)
Source: CVE Database V5
Vendor/Project: fsspec
Product: filesystem_spec

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.

CVSS v3.1

Score 8.8high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

fsspec

filesystem_spec

Affected versions
>=0.9.0 <2026.6.0
fsspec
pkg:pypi/fsspec
Affected versions
>=0.9.0 <2026.6.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/02/2026, 17:01:03 UTC

Technical Analysis

The vulnerability exists in fsspec's ReferenceFileSystem implementation, which evaluates fields from Kerchunk reference JSON documents using unrestricted jinja2.Template(...).render(...) calls in the functions _process_references1._render_jinja, _process_templates, and _process_gen. An attacker supplying a malicious JSON document inline or via a URL can inject template expressions that execute arbitrary Python code when the filesystem is opened, including through consumers like xarray. The _process_gen function is invoked whenever the document includes a gen array, while the other vulnerable paths depend on template-related options. This improper control of code generation (CWE-94) leads to remote code execution. The issue is resolved in fsspec version 2026.6.0.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary Python code remotely with no privileges required and only user interaction needed. This can lead to full compromise of the environment running the vulnerable fsspec version, including confidentiality, integrity, and availability impacts. The CVSS v3.1 score is 8.8 (high), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade to fsspec version 2026.6.0 or later, where this code injection vulnerability is fixed. No other mitigations are documented. Users should avoid opening untrusted Kerchunk reference JSON documents with vulnerable versions. Patch status is confirmed fixed in 2026.6.0.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-02T14:38:43.244Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6abfdfeca43b0b3b89da151b

Added to database: 10/02/2026, 16:46:36 UTC

Last enriched: 10/02/2026, 17:01:03 UTC

Last updated: 10/02/2026, 17:46:47 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses