CVE-2026-120194: Json-glib: json-glib: infinite loop in json_path_query() with negative jsonpath slice step
A flaw was found in json-glib. The JSONPath slice evaluator in jsonpathquery() can enter a non-terminating loop when processing slice expressions that use a negative step (for example, $[:5:-1]). The evaluator iterates with a loop condition that assumes a positive step (i < end while adding step each iteration). When start is less than end and step is negative, the loop index moves away from the termination condition, causing the calling process to hang and resulting in a denial of service. Exploitation requires an application to evaluate an attacker-controlled or otherwise untrusted JSONPath expression using the vulnerable API.
Other sources
A flaw was found in json-glib. The JSONPath slice evaluator used by jsonpathquery() can enter an infinite loop when given a slice expression with a negative step. An application that evaluates attacker-controlled JSONPath expressions can be forced into a hang, leading to a denial of service.
— MITRE