CVE-2026-54133
Awaiting Analysis Awaiting Analysis - Queue
Code Execution in jmespath.php via JMESPath Expression

Publication date: 2026-06-12

Last updated on: 2026-06-12

Assigner: GitHub, Inc.

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 Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-12
Last Modified
2026-06-12
Generated
2026-06-12
AI Q&A
2026-06-12
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
jmespath jmespath.php to 2.9.1 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CWE-20 The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
CWE-116 The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2026-54133 is a critical code injection vulnerability in the jmespath.php package versions prior to 2.9.1. It occurs when the JmesPath\CompilerRuntime is used with attacker-controlled JMESPath expressions. The compiler generates PHP source code by embedding parsed JMESPath function names without properly escaping them. An attacker can craft a malicious JMESPath expression that causes the generated cache file to contain executable PHP code controlled by the attacker. This malicious code is then loaded and executed by the compiler runtime, allowing arbitrary code execution with the privileges of the PHP process.

Impact Analysis

This vulnerability can lead to arbitrary code execution on the server running the vulnerable jmespath.php package. An attacker who can control the JMESPath expression can inject and execute malicious PHP code, potentially compromising the entire application and server. This can result in data theft, data loss, service disruption, or full system compromise. The vulnerability is remotely exploitable without requiring any privileges or user interaction.

Detection Guidance

Detection of this vulnerability involves identifying if your PHP application uses the jmespath.php package with a version prior to 2.9.1 and if it employs the JmesPath\CompilerRuntime with attacker-controlled JMESPath expressions.

You can check the installed version of jmespath.php by running a command to inspect your PHP dependencies, for example:

  • composer show jmespath/jmespath.php

To detect if the vulnerable CompilerRuntime is used and JP_PHP_COMPILE is enabled, you may need to review your application code or configuration for usage of JmesPath\CompilerRuntime and the JP_PHP_COMPILE setting.

Additionally, you can search for suspicious PHP cache files generated by the compiler that contain unexpected or attacker-controlled PHP code. For example, on the server, you might run:

  • grep -r --include="*.php" -E "function|eval|assert" /path/to/cache/

Network detection is difficult since exploitation requires attacker-controlled JMESPath expressions; monitoring logs for unusual or unexpected JMESPath expressions or payloads may help.

Mitigation Strategies

Immediate mitigation steps include upgrading the jmespath.php package to version 2.9.1 or later, where the vulnerability is patched.

If upgrading is not immediately possible, apply the following workarounds:

  • Disable the JP_PHP_COMPILE setting to prevent the compiler from generating executable PHP code.
  • Avoid using JmesPath\CompilerRuntime with untrusted or attacker-controlled JMESPath expressions.
  • Use the default AstRuntime for evaluating untrusted JMESPath expressions instead of the CompilerRuntime.

Ensure that any untrusted JMESPath expressions are never evaluated by the compiler runtime until the package is upgraded.

Compliance Impact

CVE-2026-54133 is a critical code injection vulnerability that allows an attacker to execute arbitrary PHP code within affected applications. This can lead to unauthorized access, data manipulation, or data disclosure.

Such unauthorized access or data breaches can impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of sensitive data and mandate controls against unauthorized access and code execution.

Organizations using vulnerable versions of jmespath.php that allow attacker-controlled expressions to be compiled may risk violating these regulations if the vulnerability is exploited, potentially leading to data breaches or loss of data integrity.

Mitigations such as upgrading to version 2.9.1 or later, disabling JP_PHP_COMPILE, or avoiding the use of CompilerRuntime with untrusted expressions are necessary to maintain compliance and reduce risk.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-54133. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart