Bug 1593803 (CVE-2018-10870) - CVE-2018-10870 redhat-certification: rhcertStore.py:__saveResultsFile allows to write any file
Summary: CVE-2018-10870 redhat-certification: rhcertStore.py:__saveResultsFile allows ...
Status: CLOSED ERRATA
Alias: CVE-2018-10870
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
urgent
urgent
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=critical,public=20180718,repor...
Keywords: Security
Depends On: 1608782
Blocks: 1593614
TreeView+ depends on / blocked
 
Reported: 2018-06-21 15:30 UTC by Riccardo Schirone
Modified: 2018-08-10 06:12 UTC (History)
5 users (show)

Fixed In Version: redhat-certification 5.15-20180717
Doc Type: If docs needed, set a value
Doc Text:
It has been discovered that redhat-certification does not properly sanitize paths in rhcertStore.py:__saveResultsFile. A remote attacker could use this flaw to overwrite any file, potentially gaining remote code execution.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-08-10 06:12:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2373 None None None 2018-08-09 17:22 UTC

Description Riccardo Schirone 2018-06-21 15:30:19 UTC
It has been discovered that redhat-certification does not properly sanitize paths in rhcertStore.py:__saveResultsFile. A remote attacker could use this flaw to overwrite any file, potentially gaining remote code execution.

Comment 1 Riccardo Schirone 2018-06-21 15:30:22 UTC
Acknowledgments:

Name: Riccardo Schirone (Red Hat Product Security)

Comment 2 Riccardo Schirone 2018-06-21 15:30:25 UTC
Mitigation:

If SELinux is enabled it further restricts the set of files an attacker may write to. This prevents some basic attacks that would allow to gain remote code execution, though it is not excluded other means are possible.

Comment 5 Riccardo Schirone 2018-06-25 13:06:42 UTC
resultsFileName in rhcertStore.py:__saveResultsFile creates the path on the server by concatenating some fixed strings with others that can be manipulated by an attacker. In particular, when uploading a "transfer" file in /save, the clientIP is used to construct the final path, however clientIP is under the attacker's control because taken from the X-Forwarded-For HTTP header.

Comment 8 errata-xmlrpc 2018-08-09 17:22:53 UTC
This issue has been addressed in the following products:

  Red Hat Certification for Red Hat Enterprise Linux 7

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


Note You need to log in before you can comment on or make changes to this bug.