CVE-2022-39365
PHP vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2022-39365) affects Pimcore's Mail and Dynamic Text Layout components, where user-controlled twig templates rendering was vulnerable to server-side template injection leading to Remote Code Execution (RCE). The issue was discovered in versions prior to 10.5.9 and was patched in version 10.5.9. The vulnerability was reported by nth347 from Viettel Cyber Security (Security Advisory).

Technical details

The vulnerability exists in Pimcore/Mail and ClassDefinition\Layout\Text components where user-controlled twig templates could be rendered without proper sandbox restrictions. This could allow an attacker to execute arbitrary code through template injection. The issue was classified as CWE-94 (Improper Control of Generation of Code) and received a moderate severity rating (Security Advisory).

Impact

If exploited, this vulnerability could allow attackers to execute arbitrary code on the server through template injection in email content and dynamic text layouts. This could potentially lead to complete system compromise (Security Advisory).

Mitigation and workarounds

The primary mitigation is to upgrade to Pimcore version 10.5.9 or later. Alternatively, users can manually apply the patch available at the pull request #13347. The fix implements restrictive security policies for tags, filters, and functions in a sandbox environment for template rendering (GitHub PR).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-21857HIGH8.3
  • PHPPHP
  • redaxo/source
NoYesJan 07, 2026
CVE-2025-61676MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2025-61674MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2026-21896MEDIUM5.8
  • PHPPHP
  • getkirby/cms
NoYesJan 08, 2026
CVE-2026-22242MEDIUM4.9
  • PHPPHP
  • coreshop/core-shop
NoYesJan 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management