Bug 1535251 (CVE-2018-5712)

Summary: CVE-2018-5712 php: Reflected XSS on PHAR 404 page
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acomabon, fedora, hhorak, jorton, kbost, kwalker, rcollet, scorneli, webstack-team, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 7.0.27, php 7.1.13, php 7.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:37:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1535684, 1554327, 1579205, 1579206, 1579242    
Bug Blocks: 1535252, 1574650    

Description Laura Pardo 2018-01-16 23:35:56 UTC
A flaw was found in php when creating a .phar file and configuring apache to handle phar files using php, when accessing invalid page the page name is reflected back to the user in the 404 response. This user input is not being sanitized and therefore it is vulnerable to a reflected XSS. Making, every site configured to run .phar files using php vulnerable.

References:
https://bugs.php.net/bug.php?id=74782
https://bugs.php.net/bug.php?id=74782

Patch:
https://gist.github.com/anonymous/70d2f6bac8db576d6386bd79c1e6e081

Comment 1 Laura Pardo 2018-01-17 21:36:02 UTC
Wrong patch link on #c0, the correct one is:
http://git.php.net/?p=php-src.git;a=commit;h=4e3f55c36272a5f29b50e1924b78e9db1b23f214

Comment 2 Laura Pardo 2018-01-17 21:37:08 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1535684]

Comment 6 errata-xmlrpc 2018-05-03 05:08:31 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS

Via RHSA-2018:1296 https://access.redhat.com/errata/RHSA-2018:1296

Comment 15 errata-xmlrpc 2019-08-19 08:41:01 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2019:2519 https://access.redhat.com/errata/RHSA-2019:2519

Comment 16 errata-xmlrpc 2020-03-31 19:23:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:1112 https://access.redhat.com/errata/RHSA-2020:1112