First published: Fri Jun 28 2013(Updated: )
Ruby’s SSL client implements hostname identity check but it does not properly handle hostnames in the certificate that contain null bytes. OpenSSL::SSL.verify_certificate_identity implements RFC2818 Server Identity check for Ruby’s SSL client but it does not properly handle hostnames in the subjectAltName X509 extension that contain null bytes. Existing code in lib/openssl/ssl.rb uses OpenSSL::X509::Extension#value for extracting identity from subjectAltName. Extension#value depends OpenSSL function X509V3_EXT_print() and for dNSName of subjectAltName it utilizes sprintf() that is known as null byte unsafe. As the result Extension#value returns ‘www.ruby-lang.org’ if the subjectAltName is ‘www.ruby-lang.org\0.example.com’ and OpenSSL::SSL.verify_certificate_identity wrongly identifies the certificate is for ‘www.ruby-lang.org’. When a CA a SSL client trusts allows to issue the server certificate that has null byte in subjectAltName, remote attackers can obtain the certificate for ‘www.ruby-lang.org\0.example.com’ from the CA to spoof ‘www.ruby-lang.org’ and do man-in-the-middle between Ruby’s SSL client and SSL servers. External References: <a href="http://www.ruby-lang.org/en/news/2013/06/27/hostname-check-bypassing-vulnerability-in-openssl-client-cve-2013-4073/">http://www.ruby-lang.org/en/news/2013/06/27/hostname-check-bypassing-vulnerability-in-openssl-client-cve-2013-4073/</a>
Credit: cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/ruby | <2.0.0 | 2.0.0 |
redhat/ruby | <1.9.3 | 1.9.3 |
redhat/ruby | <1.8.7 | 1.8.7 |
Ruby | =1.8.6-26 | |
Ruby | =1.8.7 | |
Ruby | =1.8.7-p160 | |
Ruby | =1.8.7-p17 | |
Ruby | =1.8.7-p173 | |
Ruby | =1.8.7-p174 | |
Ruby | =1.8.7-p22 | |
Ruby | =1.8.7-p248 | |
Ruby | =1.8.7-p249 | |
Ruby | =1.8.7-p299 | |
Ruby | =1.8.7-p301 | |
Ruby | =1.8.7-p302 | |
Ruby | =1.8.7-p330 | |
Ruby | =1.8.7-p334 | |
Ruby | =1.8.7-p352 | |
Ruby | =1.8.7-p357 | |
Ruby | =1.8.7-p358 | |
Ruby | =1.8.7-p370 | |
Ruby | =1.8.7-p371 | |
Ruby | =1.8.7-p373 | |
Ruby | =1.8.7-p71 | |
Ruby | =1.8.7-p72 | |
Ruby | =1.8.7-preview1 | |
Ruby | =1.8.7-preview2 | |
Ruby | =1.8.7-preview3 | |
Ruby | =1.8.7-preview4 | |
Ruby | =1.9.3 | |
Ruby | =1.9.3-p0 | |
Ruby | =1.9.3-p125 | |
Ruby | =1.9.3-p194 | |
Ruby | =1.9.3-p286 | |
Ruby | =1.9.3-p383 | |
Ruby | =1.9.3-p385 | |
Ruby | =1.9.3-p392 | |
Ruby | =1.9.3-p426 | |
Ruby | =1.9.3-p429 | |
Ruby | =2.0.0-p0 | |
Ruby | =2.0.0-p195 | |
Ruby | =2.0.0-preview1 | |
Ruby | =2.0.0-preview2 | |
Ruby | =2.0.0-rc1 | |
Ruby | =2.0.0-rc2 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of CVE-2013-4073 is classified as medium risk due to improper handling of null bytes in hostnames.
To fix CVE-2013-4073, upgrade your Ruby version to 2.0.0, 1.9.3, or 1.8.7.
CVE-2013-4073 affects Ruby versions 1.8.6 through 2.0.0, including 1.8.7 and 1.9.3.
The impact of CVE-2013-4073 is that it allows an attacker to bypass hostname verification in SSL connections.
No specific patch is provided; users must upgrade to the recommended Ruby versions to mitigate CVE-2013-4073.