Loading...
Skip to main content

CVE-2026-54133 — Vulnerability in mtdowling/jmespath.php — CVE Details

CRITICAL

jmespath.php has CompilerRuntime code injection via unescaped function names

Published August 18, 2026Updated August 18, 2026Source: osv

Summary

## 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.

Advisory Timeline

  • First published August 18, 2026 (55 days ago).
  • Last revised August 18, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update mtdowling/jmespath.php to 2.9.1 or later
composer require "mtdowling/jmespath.php:^2.9.1"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
mtdowling/jmespath.php
packagist
0.1.0, 0.2.0, 0.3.0, 0.4.0 (+14 more)2.9.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-116
    Improper Encoding or EscapingMITRE
  • CWE-20
    Improper Input ValidationMITRE
  • CWE-94
    Code InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-54133?
jmespath.php has CompilerRuntime code injection via unescaped function names This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-54133?
CVE-2026-54133 affects mtdowling/jmespath.php. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-54133 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-pcw8-m77r-2528

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies