CVE-2021-41170
PHP vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2021-41170) affects neoan3-template versions prior to 1.1.1, where the template engine allowed direct injection of closures. The issue was discovered and disclosed on November 8, 2021. The vulnerability arises when a value has the same name as a method or function in scope, which can be executed either accidentally or maliciously through the template engine (GitHub Advisory).

Technical details

The vulnerability occurs in the template evaluation process where closures are evaluated based on whether a value is callable within the current scope. This implementation allows values that are callable to be executed by the template engine. The issue affects scenarios where the application deals with direct user input or database values, making it particularly concerning for applications that process untrusted data (GitHub Issue). The vulnerability has been assigned a CVSS score of 7.5, indicating a high severity level (CISA Bulletin).

Impact

The vulnerability enables a potential multi-step attack where an attacker could store particular values into the database that are known to be eventually rendered by the template engine. If the value of a key happens to be callable, it could lead to the execution of global or local functions and methods. This affects all users of the package who handle direct user input or database values (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 1.1.1 of the package. The fix prevents direct injection of closures into the template engine and requires explicit registration of closures using TemplateFunctions::registerClosure(). For versions prior to 1.1.1, the only workaround is to use hardcoded values, though this significantly limits the template engine's functionality. Users are strongly recommended to upgrade to version 1.1.1 or later (GitHub Advisory).

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-23492HIGH8.8
  • PHPPHP
  • pimcore/pimcore
NoYesJan 14, 2026
CVE-2026-23498HIGH7.2
  • PHPPHP
  • shopware/core
NoYesJan 14, 2026
GHSA-595p-g7xc-c333MEDIUM6.9
  • PHPPHP
  • algolia/algoliasearch-magento-2
NoYesJan 14, 2026
CVE-2022-50807MEDIUM6.9
  • PHPPHP
  • concrete5/concrete5
NoNoJan 13, 2026
CVE-2026-0859MEDIUM5.2
  • PHPPHP
  • typo3/cms-core
NoYesJan 13, 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