# 当 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` 配置以缓解问题。
# | 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详情 |
标题: Potential RCE when PHP `register_argc_argv` config setting is enabled · Advisory · craftcms/cms · GitHub -- 🔗来源链接
标签: x_refsource_CONFIRM
标题: Fixed an RCE vulnerability · craftcms/cms@82e893f · GitHub -- 🔗来源链接
标签: x_refsource_MISC