CVE-2026-54133: CWE-20: Improper Input Validation in jmespath jmespath.php
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.
AI Analysis
Technical Summary
jmespath.php before version 2.9.1 contains an improper input validation vulnerability (CWE-20) that allows an attacker to inject and execute arbitrary PHP code via crafted JMESPath expressions when using the JmesPath\CompilerRuntime. The vulnerability arises because the compiler emits parsed function names into generated PHP source code without sufficient escaping, resulting in attacker-controlled PHP code being written to cache files and subsequently executed. This can lead to full compromise of the PHP application. The vulnerability is addressed in version 2.9.1 by fixing the escaping issue. Workarounds include disabling JP_PHP_COMPILE and avoiding the use of CompilerRuntime with untrusted input, instead using the safer AstRuntime.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary PHP code on the server without any privileges or user interaction, leading to complete compromise of confidentiality, integrity, and availability of the affected system. The CVSS v3.1 base score is 9.8 (critical), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and full impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available in jmespath.php version 2.9.1 and later. Users should upgrade to version 2.9.1 or above to remediate this vulnerability. Until upgrading, users should disable JP_PHP_COMPILE and avoid using JmesPath\CompilerRuntime with untrusted or attacker-controlled expressions. Instead, use the default AstRuntime for evaluating untrusted expressions. Applications that must accept untrusted expressions should ensure these are never evaluated by the compiler runtime to prevent code execution.
CVE-2026-54133: CWE-20: Improper Input Validation in jmespath jmespath.php
Description
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.
CVSS v3.1
Score 9.8critical
Affected software
pkg:composer/jmespath/jmespath.phpRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
jmespath.php before version 2.9.1 contains an improper input validation vulnerability (CWE-20) that allows an attacker to inject and execute arbitrary PHP code via crafted JMESPath expressions when using the JmesPath\CompilerRuntime. The vulnerability arises because the compiler emits parsed function names into generated PHP source code without sufficient escaping, resulting in attacker-controlled PHP code being written to cache files and subsequently executed. This can lead to full compromise of the PHP application. The vulnerability is addressed in version 2.9.1 by fixing the escaping issue. Workarounds include disabling JP_PHP_COMPILE and avoiding the use of CompilerRuntime with untrusted input, instead using the safer AstRuntime.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary PHP code on the server without any privileges or user interaction, leading to complete compromise of confidentiality, integrity, and availability of the affected system. The CVSS v3.1 base score is 9.8 (critical), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and full impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available in jmespath.php version 2.9.1 and later. Users should upgrade to version 2.9.1 or above to remediate this vulnerability. Until upgrading, users should disable JP_PHP_COMPILE and avoid using JmesPath\CompilerRuntime with untrusted or attacker-controlled expressions. Instead, use the default AstRuntime for evaluating untrusted expressions. Applications that must accept untrusted expressions should ensure these are never evaluated by the compiler runtime to prevent code execution.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-11T21:15:33.870Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a2c1a26e617e2d8347eb5b4
Added to database: 6/12/2026, 2:39:34 PM
Last enriched: 6/12/2026, 2:54:45 PM
Last updated: 6/12/2026, 3:44:04 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.