Skip to content

PHP code execution through Parser conditionals in user-editable templates

High
paulbalandan published GHSA-4q58-jw8x-8cm7 Oct 9, 2026

Package

composer codeigniter4/framework (Composer)

Affected versions

< 4.7.5

Patched versions

4.7.5

Description

Impact

This is a code injection vulnerability that can lead to arbitrary PHP code execution in applications that let less-trusted users edit View Parser templates. Applications are impacted when they:

  • allow users to edit template source, such as an online email template, and
  • render that source with unrestricted Parser conditional tags.

Applications using only developer-controlled templates are not affected.

Patches

Upgrade to v4.7.5 or later.

Applications must enable Config\View::$restrictParserConditionals or the per-render restrictConditionals option for every affected template. Upgrading alone does not remove the exposure.

Workarounds

  • Limit template editing to users trusted to execute PHP on the server.
  • Avoid rendering less-trusted template source with the Parser until the conditional restriction is enabled.

References

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

Improper Control of Generation of Code ('Code Injection')

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. Learn more on MITRE.

Credits