ID CVE-2007-5162
Summary The connect method in lib/net/http.rb in the (1) Net::HTTP and (2) Net::HTTPS libraries in Ruby 1.8.5 and 1.8.6 does not verify that the commonName (CN) field in a server certificate matches the domain name in an HTTPS request, which makes it easier for remote attackers to intercept SSL transmissions via a man-in-the-middle attack or spoofed web site.
References
Vulnerable Configurations
  • Ruby-lang Ruby 1.8.5
    cpe:2.3:a:ruby-lang:ruby:1.8.5
  • Ruby-lang Ruby 1.8.6
    cpe:2.3:a:ruby-lang:ruby:1.8.6
CVSS
Base: 4.3 (as of 01-10-2007 - 18:26)
Impact:
Exploitability:
CWE CWE-287
CAPEC
  • Authentication Abuse
    An attacker obtains unauthorized access to an application, service or device either through knowledge of the inherent weaknesses of an authentication mechanism, or by exploiting a flaw in the authentication scheme's implementation. In such an attack an authentication mechanism is functioning but a carefully controlled sequence of events causes the mechanism to grant access to the attacker. This attack may exploit assumptions made by the target's authentication procedures, such as assumptions regarding trust relationships or assumptions regarding the generation of secret values. This attack differs from Authentication Bypass attacks in that Authentication Abuse allows the attacker to be certified as a valid user through illegitimate means, while Authentication Bypass allows the user to access protected material without ever being certified as an authenticated user. This attack does not rely on prior sessions established by successfully authenticating users, as relied upon for the "Exploitation of Session Variables, Resource IDs and other Trusted Credentials" attack patterns.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Utilizing REST's Trust in the System Resource to Register Man in the Middle
    This attack utilizes a REST(REpresentational State Transfer)-style applications' trust in the system resources and environment to place man in the middle once SSL is terminated. Rest applications premise is that they leverage existing infrastructure to deliver web services functionality. An example of this is a Rest application that uses HTTP Get methods and receives a HTTP response with an XML document. These Rest style web services are deployed on existing infrastructure such as Apache and IIS web servers with no SOAP stack required. Unfortunately from a security standpoint, there frequently is no interoperable identity security mechanism deployed, so Rest developers often fall back to SSL to deliver security. In large data centers, SSL is typically terminated at the edge of the network - at the firewall, load balancer, or router. Once the SSL is terminated the HTTP request is in the clear (unless developers have hashed or encrypted the values, but this is rare). The attacker can utilize a sniffer such as Wireshark to snapshot the credentials, such as username and password that are passed in the clear once SSL is terminated. Once the attacker gathers these credentials, they can submit requests to the web service provider just as authorized user do. There is not typically an authentication on the client side, beyond what is passed in the request itself so once this is compromised, then this is generally sufficient to compromise the service's authentication scheme.
  • Man in the Middle Attack
    This type of attack targets the communication between two components (typically client and server). The attacker places himself in the communication channel between the two components. Whenever one component attempts to communicate with the other (data flow, authentication challenges, etc.), the data first goes to the attacker, who has the opportunity to observe or alter it, and it is then passed on to the other component as if it was never intercepted. This interposition is transparent leaving the two compromised components unaware of the potential corruption or leakage of their communications. The potential for Man-in-the-Middle attacks yields an implicit lack of trust in communication or identify between two components.
Access
VectorComplexityAuthentication
NETWORK MEDIUM NONE
Impact
ConfidentialityIntegrityAvailability
NONE PARTIAL NONE
nessus via4
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2007-2812.NASL
    description This release contains another fixes of CVE-2007-5162 for Net::FTPTLS, Net::Telnet and Net::IMAP. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2015-10-21
    plugin id 27808
    published 2007-11-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=27808
    title Fedora 8 : ruby-1.8.6.111-1.fc8 (2007-2812)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2007-2685.NASL
    description This release contains another fixes of CVE-2007-5162 for Net::FTPTLS, Net::Telnet and Net::IMAP. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-11-28
    plugin id 27791
    published 2007-11-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=27791
    title Fedora 7 : ruby-1.8.6.111-1.fc7 (2007-2685)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2007-2406.NASL
    description - Thu Oct 4 2007 Akira TAGOH - 1.8.6.110-1 - New upstream release. - ruby-r12567.patch: removed. - ruby-1.8.6-CVE-2007-5162.patch: security fix for Net::HTTP that is insufficient verification of SSL certificate. (#313791) - Wed Jul 25 2007 Akira TAGOH - 1.8.6.36-3 - ruby-r12567.patch: backport patch from upstream svn to get rid of the unnecessary declarations. (#245446) - Fri Jul 20 2007 Akira TAGOH - 1.8.6.36-2 - New upstream release. - Fix Etc::getgrgid to get the correct gid as requested. (#236647) Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-11-28
    plugin id 27772
    published 2007-11-06
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=27772
    title Fedora 7 : ruby-1.8.6.110-1.fc7 (2007-2406)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2007-718.NASL
    description - Thu Oct 4 2007 Akira TAGOH - 1.8.5.113-1 - New upstream release. - ruby-1.8.5-CVE-2007-5162.patch: security fix for Net::HTTP that is insufficient verification of SSL certificate. (#313801) Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2015-10-21
    plugin id 26936
    published 2007-10-09
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=26936
    title Fedora Core 6 : ruby-1.8.5.113-1.fc6 (2007-718)
  • NASL family Mandriva Local Security Checks
    NASL id MANDRIVA_MDVSA-2008-029.NASL
    description Ruby network libraries Net::HTTP, Net::IMAP, Net::FTPTLS, Net::Telnet, Net::POP3, and Net::SMTP, up to Ruby version 1.8.6 are affected by a possible man-in-the-middle attack, when using SSL, due to a missing check of the CN (common name) attribute in SSL certificates against the server's hostname. The updated packages have been patched to prevent the issue.
    last seen 2019-02-21
    modified 2018-12-05
    plugin id 38115
    published 2009-04-23
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=38115
    title Mandriva Linux Security Advisory : ruby (MDVSA-2008:029)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-596-1.NASL
    description Chris Clark discovered that Ruby's HTTPS module did not check for commonName mismatches early enough during SSL negotiation. If a remote attacker were able to perform man-in-the-middle attacks, this flaw could be exploited to view sensitive information in HTTPS requests coming from Ruby applications. (CVE-2007-5162) It was discovered that Ruby's FTPTLS, telnets, and IMAPS modules did not check the commonName when performing SSL certificate checks. If a remote attacker were able to perform man-in-the-middle attacks, this flaw could be exploited to eavesdrop on encrypted communications from Ruby applications using these protocols. (CVE-2007-5770). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-11-28
    plugin id 31704
    published 2008-03-28
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=31704
    title Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : ruby1.8 vulnerabilities (USN-596-1)
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2007-0965.NASL
    description Updated ruby packages that fix several security issues are now available for Red Hat Enterprise Linux 5. This update has been rated as having moderate security impact by the Red Hat Security Response Team. Ruby is an interpreted scripting language for object-oriented programming. An SSL certificate validation flaw was discovered in several Ruby Net modules. The libraries were not checking the requested host name against the common name (CN) in the SSL server certificate, possibly allowing a man in the middle attack. (CVE-2007-5162, CVE-2007-5770) Users of Ruby should upgrade to these updated packages, which contain a backported patch to resolve these issues.
    last seen 2019-02-21
    modified 2018-11-16
    plugin id 28202
    published 2007-11-14
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28202
    title RHEL 5 : ruby (RHSA-2007:0965)
  • NASL family Oracle Linux Local Security Checks
    NASL id ORACLELINUX_ELSA-2007-0961.NASL
    description From Red Hat Security Advisory 2007:0961 : Updated ruby packages that fix several security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. Ruby is an interpreted scripting language for object-oriented programming. A flaw was discovered in the way Ruby's CGI module handles certain HTTP requests. If a remote attacker sends a specially crafted request, it is possible to cause the ruby CGI script to enter an infinite loop, possibly causing a denial of service. (CVE-2006-6303) An SSL certificate validation flaw was discovered in several Ruby Net modules. The libraries were not checking the requested host name against the common name (CN) in the SSL server certificate, possibly allowing a man in the middle attack. (CVE-2007-5162, CVE-2007-5770) Users of Ruby should upgrade to these updated packages, which contain backported patches to resolve these issues.
    last seen 2019-02-21
    modified 2018-07-18
    plugin id 67584
    published 2013-07-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=67584
    title Oracle Linux 4 : ruby (ELSA-2007-0961)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1411.NASL
    description Several vulnerabilities have been discovered in Ruby, an object-oriented scripting language. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2007-5162 It was discovered that the Ruby HTTP(S) module performs insufficient validation of SSL certificates, which may lead to man-in-the-middle attacks. - CVE-2007-5770 It was discovered that the Ruby modules for FTP, Telnet, IMAP, POP and SMTP perform insufficient validation of SSL certificates, which may lead to man-in-the-middle attacks.
    last seen 2019-02-21
    modified 2018-08-09
    plugin id 28300
    published 2007-11-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28300
    title Debian DSA-1411-1 : libopenssl-ruby - programming error
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1410.NASL
    description Several vulnerabilities have been discovered in Ruby, an object-oriented scripting language. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2007-5162 It was discovered that the Ruby HTTP(S) module performs insufficient validation of SSL certificates, which may lead to man-in-the-middle attacks. - CVE-2007-5770 It was discovered that the Ruby modules for FTP, Telnet, IMAP, POP and SMTP perform insufficient validation of SSL certificates, which may lead to man-in-the-middle attacks.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 28299
    published 2007-11-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28299
    title Debian DSA-1410-1 : ruby1.8 - programming error
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2007-0961.NASL
    description Updated ruby packages that fix several security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. Ruby is an interpreted scripting language for object-oriented programming. A flaw was discovered in the way Ruby's CGI module handles certain HTTP requests. If a remote attacker sends a specially crafted request, it is possible to cause the ruby CGI script to enter an infinite loop, possibly causing a denial of service. (CVE-2006-6303) An SSL certificate validation flaw was discovered in several Ruby Net modules. The libraries were not checking the requested host name against the common name (CN) in the SSL server certificate, possibly allowing a man in the middle attack. (CVE-2007-5162, CVE-2007-5770) Users of Ruby should upgrade to these updated packages, which contain backported patches to resolve these issues.
    last seen 2019-02-21
    modified 2018-11-16
    plugin id 28201
    published 2007-11-14
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28201
    title RHEL 4 : ruby (RHSA-2007:0961)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_RUBY-4703.NASL
    description This update of ruby improves the SSL certificate verification process. (CVE-2007-5162, CVE-2007-5770) Prior to this update it was possible to intercept SSL traffic with a man-in-the-middle attack.
    last seen 2019-02-21
    modified 2014-06-13
    plugin id 28328
    published 2007-11-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28328
    title openSUSE 10 Security Update : ruby (ruby-4703)
  • NASL family CentOS Local Security Checks
    NASL id CENTOS_RHSA-2007-0961.NASL
    description Updated ruby packages that fix several security issues are now available for Red Hat Enterprise Linux 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. Ruby is an interpreted scripting language for object-oriented programming. A flaw was discovered in the way Ruby's CGI module handles certain HTTP requests. If a remote attacker sends a specially crafted request, it is possible to cause the ruby CGI script to enter an infinite loop, possibly causing a denial of service. (CVE-2006-6303) An SSL certificate validation flaw was discovered in several Ruby Net modules. The libraries were not checking the requested host name against the common name (CN) in the SSL server certificate, possibly allowing a man in the middle attack. (CVE-2007-5162, CVE-2007-5770) Users of Ruby should upgrade to these updated packages, which contain backported patches to resolve these issues.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 37552
    published 2009-04-23
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=37552
    title CentOS 4 : ruby (CESA-2007:0961)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_RUBY-4702.NASL
    description This update of ruby improves the SSL certificate verification process. (CVE-2007-5162 / CVE-2007-5770) Prior to this update it was possible to intercept SSL traffic with a man-in-the-middle attack.
    last seen 2019-02-21
    modified 2012-05-17
    plugin id 29573
    published 2007-12-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=29573
    title SuSE 10 Security Update : ruby (ZYPP Patch Number 4702)
  • NASL family Scientific Linux Local Security Checks
    NASL id SL_20071113_RUBY_ON_SL5_X.NASL
    description A flaw was discovered in the way Ruby's CGI module handles certain HTTP requests. If a remote attacker sends a specially crafted request, it is possible to cause the ruby CGI script to enter an infinite loop, possibly causing a denial of service. (CVE-2006-6303) An SSL certificate validation flaw was discovered in several Ruby Net modules. The libraries were not checking the requested host name against the common name (CN) in the SSL server certificate, possibly allowing a man in the middle attack. (CVE-2007-5162, CVE-2007-5770)
    last seen 2019-02-21
    modified 2019-01-07
    plugin id 60301
    published 2012-08-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=60301
    title Scientific Linux Security Update : ruby on SL5.x, SL4.x i386/x86_64
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1412.NASL
    description Several vulnerabilities have been discovered in Ruby, an object-oriented scripting language. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2007-5162 It was discovered that the Ruby HTTP(S) module performs insufficient validation of SSL certificates, which may lead to man-in-the-middle attacks. - CVE-2007-5770 It was discovered that the Ruby modules for FTP, Telnet, IMAP, POP and SMTP perform insufficient validation of SSL certificates, which may lead to man-in-the-middle attacks.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 28301
    published 2007-11-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=28301
    title Debian DSA-1412-1 : ruby1.9 - programming error
oval via4
accepted 2013-04-29T04:08:14.521-04:00
class vulnerability
contributors
  • name Aharon Chernin
    organization SCAP.com, LLC
  • name Dragos Prisaca
    organization G2, Inc.
definition_extensions
  • comment The operating system installed on the system is Red Hat Enterprise Linux 4
    oval oval:org.mitre.oval:def:11831
  • comment CentOS Linux 4.x
    oval oval:org.mitre.oval:def:16636
  • comment Oracle Linux 4.x
    oval oval:org.mitre.oval:def:15990
  • comment The operating system installed on the system is Red Hat Enterprise Linux 5
    oval oval:org.mitre.oval:def:11414
  • comment The operating system installed on the system is CentOS Linux 5.x
    oval oval:org.mitre.oval:def:15802
  • comment Oracle Linux 5.x
    oval oval:org.mitre.oval:def:15459
description The connect method in lib/net/http.rb in the (1) Net::HTTP and (2) Net::HTTPS libraries in Ruby 1.8.5 and 1.8.6 does not verify that the commonName (CN) field in a server certificate matches the domain name in an HTTPS request, which makes it easier for remote attackers to intercept SSL transmissions via a man-in-the-middle attack or spoofed web site.
family unix
id oval:org.mitre.oval:def:10738
status accepted
submitted 2010-07-09T03:56:16-04:00
title The connect method in lib/net/http.rb in the (1) Net::HTTP and (2) Net::HTTPS libraries in Ruby 1.8.5 and 1.8.6 does not verify that the commonName (CN) field in a server certificate matches the domain name in an HTTPS request, which makes it easier for remote attackers to intercept SSL transmissions via a man-in-the-middle attack or spoofed web site.
version 24
redhat via4
advisories
  • rhsa
    id RHSA-2007:0961
  • rhsa
    id RHSA-2007:0965
rpms
  • irb-0:1.8.1-7.EL4.8.1
  • ruby-0:1.8.1-7.EL4.8.1
  • ruby-devel-0:1.8.1-7.EL4.8.1
  • ruby-docs-0:1.8.1-7.EL4.8.1
  • ruby-libs-0:1.8.1-7.EL4.8.1
  • ruby-mode-0:1.8.1-7.EL4.8.1
  • ruby-tcltk-0:1.8.1-7.EL4.8.1
  • ruby-0:1.8.5-5.el5_1.1
  • ruby-devel-0:1.8.5-5.el5_1.1
  • ruby-docs-0:1.8.5-5.el5_1.1
  • ruby-irb-0:1.8.5-5.el5_1.1
  • ruby-libs-0:1.8.5-5.el5_1.1
  • ruby-mode-0:1.8.5-5.el5_1.1
  • ruby-rdoc-0:1.8.5-5.el5_1.1
  • ruby-ri-0:1.8.5-5.el5_1.1
  • ruby-tcltk-0:1.8.5-5.el5_1.1
refmap via4
bid 25847
bugtraq
  • 20070927 Ruby Net::HTTPS library does not validate server certificate CN
  • 20071112 FLEA-2007-0068-1 ruby
confirm
debian
  • DSA-1410
  • DSA-1411
  • DSA-1412
fedora
  • FEDORA-2007-2406
  • FEDORA-2007-2685
  • FEDORA-2007-718
mandriva MDVSA-2008:029
misc
secunia
  • 26985
  • 27044
  • 27432
  • 27576
  • 27673
  • 27756
  • 27764
  • 27769
  • 27818
  • 28645
  • 29556
sreason 3180
suse SUSE-SR:2007:024
ubuntu USN-596-1
vupen ADV-2007-3340
xf ruby-nethttps-mitm(36861)
Last major update 07-03-2011 - 22:00
Published 01-10-2007 - 01:17
Last modified 15-10-2018 - 17:41
Back to Top