一、 漏洞 CVE-2024-56145 基础信息
漏洞信息
                                        # 当 PHP 的 `register_argc_argv` 配置设置在 craftcms/cms 中启用时存在的 RCE 漏洞

## 概述
Craft CMS 的某些版本中存在远程代码执行漏洞。此漏洞出现在 `register_argc_argv` 配置为启用的情况下。

## 影响版本
- 3.9.13 及更早版本
- 4.13.1 及更早版本
- 5.5.1 及更早版本

## 细节
用户的 `php.ini` 配置若启用了 `register_argc_argv`,则会受到此漏洞影响。此漏洞允许远程代码执行,风险较高。

## 影响
建议用户升级到以下版本:
- 3.9.14
- 4.13.2
- 5.5.2

对于无法升级的用户,建议关闭 `register_argc_argv` 配置以缓解问题。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified remote code execution vector is present. Users are advised to update to version 3.9.14, 4.13.2, or 5.5.2. Users unable to upgrade should disable `register_argc_argv` to mitigate the issue.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
对生成代码的控制不恰当(代码注入)
来源:美国国家漏洞数据库 NVD
漏洞标题
Craft CMS 代码注入漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Craft CMS是Craft CMS开源的一套内容管理系统(CMS)。 Craft CMS 5.0.0-RC1版本至5.5.2之前版本和4.0.0-RC版本至4.13.2之前版本存在代码注入漏洞,该漏洞源于php.ini配置的register_argc_argv选项被启用时,会出现未指定的远程代码执行向量。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
代码注入
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2024-56145 的公开POC
# POC 描述 源链接 神龙链接
1 Unauthenticated RCE on CraftCMS when PHP `register_argc_argv` config setting is enabled https://github.com/Chocapikk/CVE-2024-56145 POC详情
2 CVE-2024-56145 SSTI to RCE - twig templates https://github.com/Sachinart/CVE-2024-56145-craftcms-rce POC详情
3 A POC lab environment for CVE-2024-56145 CraftCMS RCE. https://github.com/hmhlol/craft-cms-RCE-CVE-2024-56145 POC详情
4 This template identifies a critical Remote Code Execution (RCE) vulnerability in Craft CMS, identified as GHSA-2p6p-9rc9-62j9. The vulnerability exists due to improper handling of the `--templatesPath` query parameter, allowing attackers to execute arbitrary code by referencing malicious Twig templates. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-56145.yaml POC详情
5 None https://github.com/Threekiii/Awesome-POC/blob/master/CMS%E6%BC%8F%E6%B4%9E/CraftCMS%20register_argc_argv%20%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E%20CVE-2024-56145.md POC详情
6 https://github.com/vulhub/vulhub/blob/master/craftcms/CVE-2024-56145/README.md POC详情
三、漏洞 CVE-2024-56145 的情报信息