{"id":"CVE-2026-55865","published":"2026-07-09T20:34:38Z","modified":"2026-07-14T01:16:10Z","title":"Python Liquid: Infinite loop when parsing malformed `{% case %}` tags","vendor":"jg-rp","product":"liquid","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00451,"percentile":0.40053,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://github.com/jg-rp/liquid/security/advisories/GHSA-vq2f-vcc9-j8mv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jg-rp/liquid/commit/26db8931cf35e8433c1ca506fc32c3bb62f743d4","tags":["x_refsource_MISC"]},{"url":"https://github.com/jg-rp/liquid/releases/tag/v2.2.1","tags":["x_refsource_MISC"]}],"priority":{"score":13.0,"factors":[{"name":"EPSS percentile","points":8.01},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"jg-rp","affectedVersions":[{"vendor":"jg-rp","product":"liquid","versions":["< 2.2.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-07-14T01:15:58.872155Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"python-liquid","vulnerableRanges":["<2.2.1"],"patched":["2.2.1"],"from":["GHSA-vq2f-vcc9-j8mv","PYSEC-2026-3035"],"provenance":"source"}],"summary":{"text":"The flaw is in the parser of jg-rp's Python Liquid (the liquid product), a Python engine for the Liquid template language: a malformed {% case %} tag lacking a matching {% when %} or {% else %} block and a terminating {% endcase %} tag causes parsing to enter an infinite loop, because liquid.TokenStream.eof does not return an EOF token matching the expected kind and value. An attacker with low-privileged access who can supply a template to the engine, and who needs no user interaction, can craft such a malformed template to hang parsing and cause a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:45:09Z"},"euvd":{"id":"EUVD-2026-42693","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-45017","published":"2026-05-28","fixed":"2.2.0","kev":false,"link":{"from":"CVE-2026-45017","to":"CVE-2026-55865","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:python-liquid","fromFixed":"2.2.0","toFixed":"2.2.1","daysApart":42}]}},{"cve":"CVE-2026-55865","published":"2026-07-09","fixed":"2.2.1","kev":false}],"package":"PyPI:python-liquid"}}