CVE-2023-32679:Craft CMS vulnerability allows unrestricted file extensions in template rendering, potentially leading to Remote Code Execution by admin users in certain environments.

splash
Back

Description Preview

A vulnerability in Craft CMS allows arbitrary file extensions to be rendered as Twig templates due to insufficient validation in the template resolution process. Specifically, in the View.php file, the doesTemplateExist() function calls resolveTemplate(), which calls _resolveTemplateInternal(), which then calls _resolveTemplate(). When the name parameter value is not an empty string, the function returns directly without proper extension verification. This allows attackers with admin privileges to exploit the vulnerability on development environments or improperly configured staging/production environments, potentially achieving remote code execution and gaining access to the host operating system.

Overview

This vulnerability (CVE-2023-32679) affects Craft CMS versions prior to 4.4.6. The issue stems from improper validation of file extensions in the template resolution process, which can be exploited by authenticated administrators to execute arbitrary code. The vulnerability is particularly dangerous in development environments or improperly configured staging/production environments where an attacker with admin access could leverage this flaw to gain control of the underlying operating system. The vulnerability is in the template resolution chain where the code bypasses extension verification under certain conditions.

Remediation

  1. Update to Craft CMS version 4.4.6 or later, which contains the fix for this vulnerability.
  2. If immediate updating is not possible, ensure that admin access is strictly limited to trusted users only.
  3. Properly configure staging and production environments with appropriate security controls.
  4. Implement the principle of least privilege for all CMS administrators.
  5. Regularly audit your Craft CMS installations for security best practices.
  6. There are no known workarounds for this vulnerability other than upgrading.

References

  1. GitHub Security Advisory: https://github.com/craftcms/cms/security/advisories/GHSA-vqxf-r9ph-cc9c
  2. Craft CMS Security Releases: https://craftcms.com/knowledge-base/security-releases
  3. CVE-2023-32679 Details: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-32679

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Accommodation & Food Services
    Accommodation & Food Services
  2. Administrative, Support, Waste Management & Remediation Services
    Administrative, Support, Waste Management & Remediation Services
  3. Agriculture, Forestry Fishing & Hunting
    Agriculture, Forestry Fishing & Hunting
  4. Arts, Entertainment & Recreation
    Arts, Entertainment & Recreation
  5. Construction
    Construction
  6. Educational Services
    Educational Services
  7. Finance and Insurance
    Finance and Insurance
  8. Health Care & Social Assistance
    Health Care & Social Assistance
  9. Information
    Information
  10. Management of Companies & Enterprises
    Management of Companies & Enterprises
  11. Manufacturing
    Manufacturing
  12. Mining
    Mining
  13. Other Services (except Public Administration)
    Other Services (except Public Administration)
  14. Professional, Scientific, & Technical Services
    Professional, Scientific, & Technical Services
  15. Public Administration
    Public Administration
  16. Real Estate Rental & Leasing
    Real Estate Rental & Leasing
  17. Retail Trade
    Retail Trade
  18. Transportation & Warehousing
    Transportation & Warehousing
  19. Utilities
    Utilities
  20. Wholesale Trade
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background