Florian Weimer discovered a TOCTOU (time of check to time of use) vulnerability in the way PyWBEM, a Python library for making CIM (Common Information Model) operations over HTTP using the WBEM CIM-XML protocol, performed certificate validation. An attacker could use this flaw to perform man-in-the-middle attacks against applications that are using PyWBEM.
This issue was discovered by Florian Weimer of the Red Hat Product Security Team.
In depth information from Florian:
I noticed this code in cim_http.py:
125 from OpenSSL import SSL
126 ctx = SSL.Context(SSL.SSLv3_METHOD)
127 ctx.set_verify(SSL.VERIFY_PEER, verify_callback)
128 # Add the key and certificate to the session
129 if cert_file is not None and key_file is not None:
132 s = SSL.Connection(ctx, socket.socket(socket.AF_INET,
134 s.connect((host, port))
138 except socket.error, arg:
139 raise Error("Socket error: %s" % (arg,))
140 except socket.sslerror, arg:
141 raise Error("SSL error: %s" % (arg,))
151 h = HTTPSConnection(host, port = port, key_file = key_file,
152 cert_file = cert_file)
verify_callback is only used for the probing connection, it is not used for the actual server interaction. This means pywbem has a time-of-check-time-of-use vulnerability and man-in-the-middle attacks on the second HTTPS connection are possible.
Public now via a Fedora build. Note that the fix there may not be the correct one. Refer to http://seclists.org/oss-sec/2013/q4/524 for further details.
Created attachment 851357 [details]
Final fix. This patch corrects CVE-2013-6418 (bug 1039801) and CVE-2013-6444 (bug 1044246)
(In reply to Murray McAllister from comment #4)
> Created attachment 851357 [details]
> final fix
> Final fix. This patch corrects CVE-2013-6418 (bug 1039801) and CVE-2013-6444
> (bug 1044246)
> Upstream commit:
This one is also needed:
Created pywbem tracking bugs for this issue:
Affects: epel-5 [bug 1065357]
Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.