OSV 1.4.0 · github-reviewed · 修改于 2026-08-19 04:16
发布时间
2026-08-19 04:16
GitHub 审查时间
2026-08-19 04:16
NVD 发布时间
2026-06-12 23:16
源文件
advisories/github-reviewed/2026/08/GHSA-pcw8-m77r-2528/GHSA-pcw8-m77r-2528.json
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.
A vulnerable flow is:
JmesPath\CompilerRuntime, or with JmesPath\search() while JP_PHP_COMPILE is enabled.CompilerRuntime loads the generated cache file.In 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.
The 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.
The issue is patched in 2.9.1 and later.
If 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.