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

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-02T16:36:48.513Z
- Modified: 2026-10-15T14:56:18.658Z
- Also known as: GHSA-27vj-qcqg-25rc, PYSEC-2026-4217
- Weaknesses: CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- fsspec filesystem_spec: >= 0.9.0, < 2026.6.0
- fsspec (PyPI): from 0.9.0 before 2026.6.0

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/fsspec/filesystem_spec/security/advisories/GHSA-27vj-qcqg-25rc> (exploit, web)
- <https://github.com/fsspec/filesystem_spec/pull/2029> (web)
- <https://github.com/fsspec/filesystem_spec/pull/2039> (web)
- <https://github.com/fsspec/filesystem_spec/commit/86438783f93b1398ef245b92f0e6063b445b611c> (web)
- <https://github.com/fsspec/filesystem_spec/commit/a1c16ab3f07f354aa371c38f7b1b07ea7fd4c5c8> (web)
- <https://github.com/fsspec/filesystem_spec/releases/tag/2026.6.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-104851> (advisory)
- <https://github.com/fsspec/filesystem_spec> (package)
- <https://pypi.org/project/fsspec> (package)
- <https://github.com/advisories/GHSA-27vj-qcqg-25rc> (advisory)

## Sources

- CVE List: [CVE-2026-104851](https://www.cve.org/CVERecord?id=CVE-2026-104851), CVE Terms of Use, modified 2026-10-05
- GitHub Advisory Database: [GHSA-27vj-qcqg-25rc](https://github.com/advisories/GHSA-27vj-qcqg-25rc), CC-BY-4.0, modified 2026-10-15
- NVD: [CVE-2026-104851](https://nvd.nist.gov/vuln/detail/CVE-2026-104851), Public domain, modified 2026-10-05
- PyPA Advisory Database: [PYSEC-2026-4217](https://osv.dev/vulnerability/PYSEC-2026-4217), CC-BY-4.0, modified 2026-10-15

---

Page: https://cve.day/CVE-2026-104851 · Whole record: https://cve.day/CVE-2026-104851.json · Rebuilt by cve.day 2026-11-25T22:59:41.993Z
