# N/A
## 漏洞概述
PHP在特定版本中,当作为CGI脚本(即php-cgi)配置时,无法正确处理缺少等号(=)的查询字符串,从而使远程攻击者能够通过在查询字符串中放置命令行选项来执行任意代码。
## 影响版本
- PHP 5.3.12之前的版本
- PHP 5.4.x 系列中 5.4.2之前的版本
## 漏洞细节
在sapi/cgi/cgi_main.c 文件中存在一个漏洞,该漏洞与php_getopt函数的处理有关,特别是在处理'd'选项时未能正确跳过相关的php_getopt调用。攻击者可以在查询字符串中插入命令行选项,从而实现代码的任意执行。
## 影响
此漏洞允许远程攻击者执行任意代码,对受影响系统的安全构成严重威胁。
是否为 Web 类漏洞: 是
判断理由:
| # | POC 描述 | 源链接 | 神龙链接 |
|---|---|---|---|
| 1 | None | https://github.com/drone789/CVE-2012-1823 | POC详情 |
| 2 | First script, pgp-cgi-cve-2012-1823 BASH script | https://github.com/tardummy01/oscp_scripts-1 | POC详情 |
| 3 | PHP-CGI-REMOTE_CVE-2012-1823, UnrealIRCd, MySQL, PostgreSQL and SSH bruteforce, VSFTPD2.3.4, samba CVE-2007-2447, JAVA RMI Server, distcc daemon, misconfigured NFS files, etc. | https://github.com/Unix13/metasploitable2 | POC详情 |
| 4 | None | https://github.com/cyberharsh/PHP_CVE-2012-1823 | POC详情 |
| 5 | PHP CGI Argument Injection RCE | https://github.com/theykillmeslowly/CVE-2012-1823 | POC详情 |
| 6 | PHP CGI Argument Injection. | https://github.com/0xl0k1/CVE-2012-1823 | POC详情 |
| 7 | Prova de conceito para PHP CGI Argument Injection (CVE-2012-1823) | https://github.com/Fatalitysec/CVE-2012-1823 | POC详情 |
| 8 | Prova de conceito de PHP CGI Argument Injection. | https://github.com/Fatalityx84/CVE-2012-1823 | POC详情 |
| 9 | Prova de conceito de php cgi argument injection | https://github.com/0xFatality/CVE-2012-1823 | POC详情 |
| 10 | None | https://github.com/Jimmy01240397/CVE-2012-1823-Analyze | POC详情 |
| 11 | CVE-2012-1823 exploit for https user password website. | https://github.com/JasonHobs/CVE-2012-1823-exploit-for-https-user-password-web | POC详情 |
| 12 | sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle query strings that lack an = (equals sign) character, which allows remote attackers to execute arbitrary code by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'd' case. | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2012/CVE-2012-1823.yaml | POC详情 |
| 13 | None | https://github.com/chaitin/xray-plugins/blob/main/poc/manual/php-cgi-cve-2012-1823.yml | POC详情 |
| 14 | https://github.com/vulhub/vulhub/blob/master/php/CVE-2012-1823/README.md | POC详情 | |
| 15 | CVE-2012-1823 exploit for https user password website. | https://github.com/Dmitri131313/CVE-2012-1823-exploit-for-https-user-password-web | POC详情 |
| 16 | Ushbu videoda Kali Linux orqali Metasploitable 2 serveriga PHP CGI Argument Injection (CVE-2012-1823) ekspluatatsiyasi Metasploit yordamida amalga oshiriladi | https://github.com/nulltrace1336/PHP-CGI-Argument-Injection-Exploit | POC详情 |
| 17 | Automated Web Vulnerability Assessment of DVWA using OWASP ZAP to identify and analyze critical security flaws like Remote Code Execution (CVE-2012-1823). | https://github.com/waburig/Open-Worldwide-Application-Security-Project-OWASP- | POC详情 |
标题: RHSA-2012:0570 - Security Advisory - Red Hat Customer Portal -- 🔗来源链接
标签:vendor-advisoryx_refsource_REDHAT
神龙速读:
### 关键信息
- **公告编号:** RHSA-2012:0570
- **摘要:** 关键: php 安全更新
- **类型/严重性:** 安全公告: 关键
- **主题:** 已更新 php 包,修复了一个安全问题,现可用于 Red Hat Application Stack v2。
- **描述:** PHP 是一个 HTML 嵌入式脚本语言,通常与 Apache HTTP 服务器一起使用。在 php-cgi 可执行文件处理命令行参数时发现了一个漏洞,这可能导致脚本的源代码泄露或以 PHP 解释器的权限执行任意代码。
- **解决方法:** 在应用此更新之前,请确保所有先前发布的相关补丁已应用于您的系统。此更新通过 Red Hat Network 提供。
- **受影响的产品:**
- Red Hat Application Stack 2 (for RHEL Server) 2 x86_64
- Red Hat Application Stack 2 (for RHEL Server) 2 i386
- **修复:**
- BZ - 818607 - CVE-2012-1823 php: 运行在 CGI 模式下时注入命令行参数
- **CVE:**
- CVE-2012-1823
- **参考资料:**
- [https://access.redhat.com/security/updates/classification/#critical](https://access.redhat.com/security/updates/classification/#critical)
暂无评论