# CVE-2026-55865: Python Liquid: Infinite loop when parsing malformed `{% case %}` tags

- Severity: High 7.1 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- 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.26%, higher than 18% of CVEs (2026-12-02)
- Published: 2026-06-19T20:46:34.000Z
- Modified: 2026-10-25T17:10:00.197Z
- Also known as: GHSA-vq2f-vcc9-j8mv, PYSEC-2026-3035
- Weaknesses: CWE-835
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

Python Liquid is a Python engine for the Liquid template language. Prior to 2.2.1, given a malformed {% case %} tag without an associated {% when %} or {% else %} block and no terminating {% endcase %} tag, Python Liquid hangs in an infinite loop at parse time because liquid.TokenStream.eof did not give the EOF token matching kind and value fields, allowing malicious template authors to craft templates for a denial of service attack. This issue is fixed in version 2.2.1.

(As written by CVE List.)

## Affected

- jg-rp liquid: < 2.2.1
- python-liquid (PyPI): before 2.2.1

## Every score

- GitHub_M: CVSS:4.0 7.1 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`

## References

- <https://github.com/jg-rp/liquid/security/advisories/GHSA-vq2f-vcc9-j8mv> (web)
- <https://github.com/jg-rp/liquid/commit/26db8931cf35e8433c1ca506fc32c3bb62f743d4>
- <https://github.com/jg-rp/liquid/releases/tag/v2.2.1>
- <https://github.com/jg-rp/liquid> (package)
- <https://pypi.org/project/python-liquid> (package)
- <https://github.com/advisories/GHSA-vq2f-vcc9-j8mv> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-55865> (advisory)

## Sources

- CVE List: [CVE-2026-55865](https://www.cve.org/CVERecord?id=CVE-2026-55865), CVE Terms of Use, modified 2026-07-14
- GitHub Advisory Database: [GHSA-vq2f-vcc9-j8mv](https://github.com/advisories/GHSA-vq2f-vcc9-j8mv), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-55865](https://nvd.nist.gov/vuln/detail/CVE-2026-55865), Public domain, modified 2026-10-25
- PyPA Advisory Database: [PYSEC-2026-3035](https://osv.dev/vulnerability/PYSEC-2026-3035), CC-BY-4.0, modified 2026-07-13

---

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