{"id":"CVE-2026-54133","aliases":["CVE-2026-54133","GHSA-pcw8-m77r-2528"],"related":[],"kind":"vulnerability","state":"published","title":"jmespath.php has CompilerRuntime code injection via unescaped function names","summary":"jmespath.php allows users to use JMESPath, software for declaratively specifying how to extract elements from a JSON document, in PHP applications with PHP data structures. Versions prior to 2.9.1 can generate and execute attacker-controlled PHP code when `JmesPath\\CompilerRuntime` is used with an attacker-controlled JMESPath expression. The compiler emits parsed JMESPath function names into generated PHP source without sufficient escaping. A crafted expression can cause the generated cache file to contain executable attacker-controlled PHP, which is then loaded by the compiler runtime. The issue is patched in `2.9.1` and later. As a workaround, disable `JP_PHP_COMPILE` and do not use `JmesPath\\CompilerRuntime` with attacker-controlled expressions. Use the default `AstRuntime` for untrusted expressions. Applications that must continue accepting untrusted JMESPath expressions before upgrading should ensure those expressions are never evaluated by the compiler runtime.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"jmespath.php allows users to use JMESPath, software for declaratively specifying how to extract elements from a JSON document, in PHP applications with PHP data structures. Versions prior to 2.9.1 can generate and execute attacker-controlled PHP code when `JmesPath\\CompilerRuntime` is used with an attacker-controlled JMESPath expression. The compiler emits parsed JMESPath function names into generated PHP source without sufficient escaping. A crafted expression can cause the generated cache file to contain executable attacker-controlled PHP, which is then loaded by the compiler runtime. The issue is patched in `2.9.1` and later. As a workaround, disable `JP_PHP_COMPILE` and do not use `JmesPath\\CompilerRuntime` with attacker-controlled expressions. Use the default `AstRuntime` for untrusted expressions. Applications that must continue accepting untrusted JMESPath expressions before upgrading should ensure those expressions are never evaluated by the compiler runtime.","source":"cvelist"},{"lang":"en","text":"## Impact\n\n`mtdowling/jmespath.php` can generate and execute attacker-controlled PHP code when `JmesPath\\CompilerRuntime` is used with an attacker-controlled JMESPath expression. The compiler emits parsed JMESPath function names into generated PHP source without sufficient escaping. A crafted expression can cause the generated cache file to contain executable attacker-controlled PHP, which is then loaded by the compiler runtime.\n\nA vulnerable flow is:\n\n1. An application accepts or constructs a JMESPath expression using attacker-controlled input.\n2. The expression is evaluated with `JmesPath\\CompilerRuntime`, or with `JmesPath\\search()` while `JP_PHP_COMPILE` is enabled.\n3. The crafted expression uses a non-identifier value where the parser accepts a function callee.\n4. The compiler writes that value into generated PHP source without safely escaping it as a PHP string literal.\n5. The generated source is written to the compiled-expression cache directory.\n6. `CompilerRuntime` loads the generated cache file.\n7. The injected PHP executes in the context of the affected application.\n\nIn that flow, an attacker can execute arbitrary PHP code with the privileges of the PHP process. The searched data document is not sufficient to exploit this issue by itself; the attacker must be able to influence the JMESPath expression string.\n\nThe default runtime used by `JmesPath\\search()` is `AstRuntime`, which interprets the parsed expression tree and is not affected unless `JP_PHP_COMPILE` is enabled. Applications are most likely to be affected when they explicitly instantiate `JmesPath\\CompilerRuntime`, enable `JP_PHP_COMPILE` as a performance optimization, and allow users to provide JMESPath expressions for filtering, querying, or transforming data.\n\n## Patches\n\nThe issue is patched in `2.9.1` and later.\n\n## Workarounds\n\nIf you cannot upgrade immediately, disable `JP_PHP_COMPILE` and do not use `JmesPath\\CompilerRuntime` with attacker-controlled expressions. Use the default `AstRuntime` for untrusted expressions. Applications that must continue accepting untrusted JMESPath expressions before upgrading should ensure those expressions are never evaluated by the compiler runtime.","format":"markdown","source":"ghsa"},{"lang":"es","text":"jmespath.php permite a los usuarios usar JMESPath, software para especificar declarativamente cómo extraer elementos de un documento JSON, en aplicaciones PHP con estructuras de datos PHP. Las versiones anteriores a la 2.9.1 pueden generar y ejecutar código PHP controlado por el atacante cuando se usa “JmesPath\\CompilerRuntime” con una expresión JMESPath controlada por el atacante. El compilador emite nombres de funciones JMESPath analizados en el código fuente PHP generado sin suficiente escape. Una expresión manipulada puede hacer que el archivo de caché generado contenga PHP ejecutable controlado por el atacante, que luego es cargado por el tiempo de ejecución del compilador. El problema está parcheado en “2.9.1” y versiones posteriores. Como solución alternativa, deshabilite “JP_PHP_COMPILE” y no use “JmesPath\\CompilerRuntime” con expresiones controladas por el atacante. Use el “AstRuntime” predeterminado para expresiones no confiables. Las aplicaciones que deben seguir aceptando expresiones JMESPath no confiables antes de la actualización deben asegurarse de que esas expresiones nunca sean evaluadas por el tiempo de ejecución del compilador.","source":"nvd"}],"published":"2026-06-12T13:56:37.874Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-20","CWE-94","CWE-116"],"affected":[{"ranges":[{"version":"< 2.9.1","status":"affected"}],"vendor":"jmespath","product":"jmespath.php","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.9.1"}],"ecosystem":"Packagist","package":"mtdowling/jmespath.php","purl":"pkg:composer/mtdowling/jmespath.php","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.9.1"}],"vendor":"jmespath","product":"jmespath","cpe":"cpe:2.3:a:jmespath:jmespath:*:*:*:*:*:php:*:*","source":"nvd"}],"references":[{"url":"https://github.com/jmespath/jmespath.php/security/advisories/GHSA-pcw8-m77r-2528","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54133","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/mtdowling/jmespath.php/CVE-2026-54133.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jmespath/jmespath.php","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-06-12T15:07:03.703Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54133","url":"https://www.cve.org/CVERecord?id=CVE-2026-54133","licence":"CVE Terms of Use","modified":"2026-06-12T15:07:16.654Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pcw8-m77r-2528","url":"https://github.com/advisories/GHSA-pcw8-m77r-2528","licence":"CC-BY-4.0","modified":"2026-08-18T20:30:07.369Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54133","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54133","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:24.519Z","epss":{"score":0.00441,"percentile":0.40105,"date":"2026-12-01T12:00:22.000Z"}}