Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. fsspec
  4. ›
  5. CVE-2026-104851

CVE-2026-104851: fsspec: Server-Side Template Injection in ReferenceFileSystem leads to Remote Code Execution

October 5, 2026

fsspec.implementations.reference.ReferenceFileSystem parses a “references” JSON document (Kerchunk format) supplied either inline or via a URL. The parser renders fields from this JSON through un-sandboxed jinja2.Template(...).render(...) calls in three locations. An attacker who controls the JSON document — typically by hosting it at a URL that the victim opens with fsspec.filesystem("reference", fo=URL) or via xarray.open_dataset("reference://...") — achieves arbitrary Python code execution on the victim machine, before any data is read.

This mirrors the pattern of CVE-2024-34359 in llama-cpp-python, where externally-sourced template strings were rendered with the default unrestricted Jinja2 environment.

References

  • github.com/advisories/GHSA-27vj-qcqg-25rc
  • github.com/fsspec/filesystem_spec/commit/86438783f93b1398ef245b92f0e6063b445b611c
  • github.com/fsspec/filesystem_spec/commit/a1c16ab3f07f354aa371c38f7b1b07ea7fd4c5c8
  • github.com/fsspec/filesystem_spec/pull/2029
  • github.com/fsspec/filesystem_spec/pull/2039
  • github.com/fsspec/filesystem_spec/releases/tag/2026.6.0
  • github.com/fsspec/filesystem_spec/security/advisories/GHSA-27vj-qcqg-25rc
  • nvd.nist.gov/vuln/detail/CVE-2026-104851

Code Behaviors & Features

Detect and mitigate CVE-2026-104851 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 0.9.0 before 2026.6.0

Fixed versions

  • 2026.6.0

Solution

Upgrade to version 2026.6.0 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/fsspec/CVE-2026-104851.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:42 +0000.