问题所在
当配置为 CGI 脚本时,PHP 在 sapi/cgi/cgi_main.c 中无法正确处理查询字符串。这允许远程攻击者在受影响的服务器上执行任意代码。
影响范围
这影响 5.3.12 之前的版本以及 5.4.0 至 5.4.2 之前的版本中被配置为 CGI 脚本的 PHP。
应对措施
根据厂商说明将 PHP 升级至版本 5.3.12 或 5.4.2。
原始描述
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.
已知被利用(CISA KEV)
- 加入 KEV 日期
- 2022-03-25
- 修复期限(美国联邦机构)
- 2022-04-15
- 用于勒索软件
- Unknown
- 要求采取的措施
- Apply updates per vendor instructions.
受影响的软件
- PHP < 5.3.12≥ 5.4.0 < 5.4.2 修复版本: 5.3.12, 5.4.2 精确匹配
详情
- 发布日期
- 2012-05-11
- 最后修改
- 2025-11-05
- CVSS 向量
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- EPSS(30 天内被利用概率)
- 100.00% (百分位 100)
参考资料
- cve.org/CVE-2012-1823
- nvd.nist.gov/vuln/detail/CVE-2012-1823
- marc.info/?l=bugtraq&m=134012830914727&w=2
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- www.securitytracker.com/id?1027022
- h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
- www.mandriva.com/security/advisories?name=MDVSA-2012:068
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- rhn.redhat.com/errata/RHSA-2012-0546.html
- rhn.redhat.com/errata/RHSA-2012-0568.html
- rhn.redhat.com/errata/RHSA-2012-0569.html
- www.php.net/ChangeLog-5.php#5.4.2
- secunia.com/advisories/49014
- rhn.redhat.com/errata/RHSA-2012-0570.html
本产品使用 NVD API 的数据,但未获得 NVD 的认可或认证。CVE® 是 The MITRE Corporation 的注册商标;CVE 记录依据 CVE Program 使用条款使用。