/

CVE-2026-30457

Severity:

CRITICAL RISK

(9.8)

Code Injection in FuelCMS dwoo Component

CVE-2026-30457

Modified

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FuelCMS v1.5.2 contains a code injection flaw in the /parser/dwoo component that allows crafted PHP code to be executed by the application.

When attacker-controlled input is interpreted as PHP within the template parser, it can lead to arbitrary code execution on the server under vulnerable configurations.

Affected context

This vulnerability affects FuelCMS v1.5.2 deployments that rely on the Dwoo-based parser for rendering templates or dynamic content.

It becomes relevant when user-supplied or otherwise low-trust data is passed—directly or indirectly—into the /parser/dwoo rendering path without adequate separation between data and executable PHP code.

Environments that allow administrators, content editors, or integrations to define or modify templates, snippets, or dynamic content fields are particularly exposed if those inputs are evaluated as PHP.

Exploit preconditions

  • Attack surface: Web interface or API endpoints that trigger the /parser/dwoo rendering logic
  • Required access: Ability to inject or control content that is processed by the Dwoo parser (e.g., template fields, content blocks, or configuration entries)
  • Trigger point: Rendering of a template or content block where the crafted input is interpreted as PHP code by the parser component
  • Why exploitation is possible: The parser evaluates or includes PHP code derived from user-controllable data, rather than strictly treating it as inert content, allowing attacker-provided code to be executed within the application context

Why this happens

The underlying issue corresponds to CWE-94: Improper Control of Generation of Code ('Code Injection').

The /parser/dwoo component appears to blur the boundary between data and executable code, allowing template or content inputs to be transformed into PHP that is subsequently evaluated or executed.

This design pattern makes the parser trust input as code instead of data, so when an attacker can influence what is rendered, they can introduce arbitrary PHP constructs that the server runs with the application's privileges.

Potential impact

  • Execution of arbitrary PHP code on the web server
  • Complete compromise of the CMS application and underlying data
  • Installation of webshells or backdoors for persistent access
  • Access to sensitive configuration values, including database credentials and API keys
  • Lateral movement within the hosting environment, depending on server configuration and privileges

General mitigation guidance

Effective mitigation centers on eliminating the ability for untrusted data to be interpreted as executable PHP by the parser.

Recommended patterns include:

  • Treat all template inputs and dynamic content as data only, never as PHP code, and avoid APIs that evaluate content as PHP.
  • Introduce a strict separation between template authorship (trusted, tightly controlled) and runtime data (potentially untrusted).
  • Constrain the template language to a safe, declarative subset that does not directly map to raw PHP execution primitives.
  • Apply robust output encoding for variables rendered within templates so that unexpected PHP constructs cannot be formed from user input.
  • Run the application and webserver with least-privilege accounts and restrict filesystem write access to reduce post-exploitation impact.

How teams detect issues like this

Detection strategies generally focus on identifying dynamic code execution paths that originate from variable or user-controlled input:

  • Use static analysis to flag calls that evaluate or include PHP generated from variables (e.g., dynamic eval, include patterns) within the /parser/dwoo code path.
  • During code review, look for template rendering logic that directly embeds raw PHP or allows template authors to write PHP-like constructs instead of using a safe templating syntax.
  • Implement application-level policies that prohibit dynamic evaluation of template content and enforce the use of a restricted template engine configuration.
  • Apply runtime monitoring and logging for suspicious template input patterns, unexpected file modifications, or anomalous PHP function usage that indicate possible code injection.

Sources

SourceLink
github.comgithub.com/daylightstudio/FUEL-CMS/tree/master/fuel/modules/fuel/libraries/parser/dwoo
pentest-tools.compentest-tools.com/PTT-2025-026-PHP-Code-Execution-Via-Dwoo-Escape.pdf

Frequently asked

questions

Yes. If an attacker can supply or modify content that is processed by the /parser/dwoo component, they may be able to trigger remote code execution over standard web or API requests.

The attacker generally needs the ability to control template-like or dynamic content that the parser processes. This might be through a compromised CMS account, a misconfigured role that allows editing of templates, or any feature that allows user input to feed into the Dwoo parser.

The safest pattern is to ensure that the parser never interprets untrusted input as PHP code. Use a strictly declarative template syntax, disable or remove any features that evaluate raw PHP in templates, and confine dynamic behavior to safe template constructs rather than runtime code evaluation.

Adopt a secure template engine configuration that does not expose direct code execution, enforce strict boundaries between code and data, perform security-focused code reviews around parsing and rendering components, and integrate static analysis to detect dynamic code evaluation patterns early in the development lifecycle.

Find out what's already
exploitable in your codebase.