CVE-2026-54133: Mtdowling/jmespath.php Jmespath.php Has CompilerRuntime Code Injection Vulnerability

CRITICAL
Advisory Identifier: GHSA-pcw8-m77r-2528
CVSS 9.8
CWE-116 CWE-94 CWE-20
Published
Advisory Summary

CVE-2026-54133 is a CRITICAL (CVSS 9.8) jmespath.php has compilerruntime code injection vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Mtdowling/jmespath.php libraries in the Packagist ecosystem. The issue involves jmespath.php has compilerruntime code injection via unescaped function names. Remediation is available by upgrading affected packages to version 2.9.1.

CVE-2026-54133 at a Glance

CVE Identifier CVE-2026-54133
GHSA Identifier GHSA-pcw8-m77r-2528
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Mtdowling/jmespath.php
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-54133

To remediate this vulnerability, upgrade all affected Mtdowling/jmespath.php dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mtdowling/jmespath.php fixed: 2.9.1
Upgrade mtdowling/jmespath.php to 2.9.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for mtdowling/jmespath.php

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-54133, inspect your project dependencies for Mtdowling/jmespath.php:

inspect dependencies for mtdowling/jmespath.php

Analyze the terminal output to locate any version of Mtdowling/jmespath.php in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where 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. In Mtdowling/jmespath.php, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Impact `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: 1. An application accepts or constructs a JMESPath expression using attacker-controlled input. 2. The expression is evaluated with `JmesPath\CompilerRuntime`, or with `JmesPath\search()` while `JP_PHP_COMPILE` is enabled. 3. The crafted expression uses a non-identifier value where the parser accepts a function callee. 4. The compiler writes that value into generated PHP source without safely escaping it as a PHP string literal. 5. The generated source is written to the compiled-expression cache directory. 6. `CompilerRuntime` loads the generated cache file. 7. The injected PHP executes in the context of the affected application. 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. ## Patches The issue is patched in `2.9.1` and later. ## Workarounds 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.

CVE-2026-54133 Affected Mtdowling/jmespath.php Versions

1 component(s)
Fixed Versions:
2.9.1
Product / Package Ecosystem Affected Versions Fixed Version
mtdowling/jmespath.php
Packagist
< 2.9.1
2.9.1

References

Frequently Asked Questions

What is CVE-2026-54133?
CVE-2026-54133 is a security vulnerability in Mtdowling/jmespath.php involving jmespath.php has CompilerRuntime code injection via unescaped function names under CWE-116: Improper Encoding or Escaping of Output.
Which Mtdowling/jmespath.php versions are affected?
Affected versions include releases prior to 2.9.1 across affected packages: mtdowling/jmespath.php.
What version fixes CVE-2026-54133?
Upgrading to 2.9.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mtdowling/jmespath.php affected?
Yes, mtdowling/jmespath.php is affected in releases prior to 2.9.1. Upgrade your dependency to 2.9.1 or later.
What is the CVSS score of CVE-2026-54133?
CVE-2026-54133 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-54133?
CVE-2026-54133 is classified under CWE-116: Improper Encoding or Escaping of Output (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.).
How can I check Packagist dependencies for CVE-2026-54133?
Run the dependency tree command: 'inspect dependencies for mtdowling/jmespath.php'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pcw8-m77r-2528",
  "modified" : "2026-08-18T20:16:38Z",
  "published" : "2026-08-18T20:16:38Z",
  "aliases" : [ "CVE-2026-54133" ],
  "summary" : "jmespath.php has CompilerRuntime code injection via unescaped function names",
  "details" : "## 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mtdowling/jmespath.php"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jmespath/jmespath.php/security/advisories/GHSA-pcw8-m77r-2528"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54133"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/mtdowling/jmespath.php/CVE-2026-54133.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jmespath/jmespath.php"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-20", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-18T20:16:38Z",
    "nvd_published_at" : "2026-06-12T15:16:31Z"
  }
}