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.
Published: 2026-07-09
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Python Liquid is a Python engine for the Liquid template language. Prior to version 2.2.1, when a template contains a malformed `{% case %}` tag that omits an associated `{% when %}` or `{% else %}` block and does not close with a `{% endcase %}` tag, the parser enters an infinite loop during parsing. This occurs because the token stream reader fails to produce an EOF token with the matching kind and value fields, allowing a malicious template author to create a denial‑of‑service template. The vulnerability is fixed in release 2.2.1.

Affected Systems

The vulnerability affects the jg-rp:liquid product, commonly known as Python Liquid. All releases prior to version 2.2.1 are impacted; upgrading to 2.2.1 or later resolves the issue.

Risk and Exploitability

The CVSS score of 7.1 indicates high severity, and the EPSS score of < 1% shows a very low but non‑zero chance of exploitation. The flaw is not included in the CISA KEV catalog. The most likely attack vector involves an adversary supplying a crafted template containing a malformed `{% case %}` block to a vulnerable application that uses Python Liquid for rendering. Successful exploitation would cause the parser to enter an infinite loop, effectively blocking the process handling the template and leading to a denial of service.

Generated by OpenCVE AI on July 31, 2026 at 13:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update Python Liquid to version 2.2.1
  • Validate user‑supplied templates to ensure all `{% case %}` tags are correctly closed before parsing, or restrict untrusted template usage entirely.
  • Implement resource limits to prevent long‑running or hanging parse operations.

Generated by OpenCVE AI on July 31, 2026 at 13:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vq2f-vcc9-j8mv Python Liquid: Infinite loop when parsing malformed `{% case %}` tags
History

Tue, 14 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 09 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Jg-rp
Jg-rp liquid
Vendors & Products Jg-rp
Jg-rp liquid

Thu, 09 Jul 2026 21:15:00 +0000

Type Values Removed Values Added
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.
Title Python Liquid: Infinite loop when parsing malformed `{% case %}` tags
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 7.1, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-14T01:16:10.895Z

Reserved: 2026-06-17T16:44:40.996Z

Link: CVE-2026-55865

cve-icon Vulnrichment

Updated: 2026-07-14T01:16:07.092Z

cve-icon NVD

Status : Deferred

Published: 2026-07-09T21:16:56.277

Modified: 2026-07-14T02:16:56.407

Link: CVE-2026-55865

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T13:30:17Z

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')