J-Security Center

Title: Ruby Net::HTTP SSL Insecure Certificate Validation Weakness

Severity: MODERATE

Description:

Ruby's Net::HTTP is a library that implements functionality to perform HTTP and HTTPS network requests. It is included with the core Ruby package.

Ruby's Net::HTTP library is prone to an insecure-certificate-validation weakness because the library fails to properly perform validity checks on X.509 certificates.

By default, the package fails to validate that the Common Name (CN) of SSL X.509 certificates matches the hostname that the library is connecting to. The library expects users to call the 'post_connection_check' method on SSL connections to perform this check, but documentation on this method is unavailable at this time.

This issue presents itself despite applications that use the OpenSSL 'verify_mode' option of 'OpenSSL::SSL::VERIFY_PEER', but may not affect the 'open-uri' form of initiating remote HTTPS connections.

Given the lack of documentation, applications that use Net::HTTP for SSL connections may not properly perform validation checks on certificates presented by servers.

Successfully exploiting this issue may allow attackers to perform man-in-the-middle attacks against applications that insecurely use the affected library. Other attacks may also be possible.

NOTE: This issue is related to multiple weaknesses covered by BID 26421 - Ruby Multiple Libraries SSL Multiple Insecure Certificate Validation Weaknesses.

Affected Products:

  • Debian Linux 3.0.0
  • Debian Linux 3.0.0 alpha
  • Debian Linux 3.0.0 arm
  • Debian Linux 3.0.0 hppa
  • Debian Linux 3.0.0 ia-32
  • Debian Linux 3.0.0 ia-64
  • Debian Linux 3.0.0 m68k
  • Debian Linux 3.0.0 mips
  • Debian Linux 3.0.0 mipsel
  • Debian Linux 3.0.0 ppc
  • Debian Linux 3.0.0 s/390
  • Debian Linux 3.0.0 sparc
  • Debian Linux 3.1.0
  • Debian Linux 3.1.0 alpha
  • Debian Linux 3.1.0 amd64
  • Debian Linux 3.1.0 arm
  • Debian Linux 3.1.0 hppa
  • Debian Linux 3.1.0 ia-32
  • Debian Linux 3.1.0 ia-64
  • Debian Linux 3.1.0 m68k
  • Debian Linux 3.1.0 mips
  • Debian Linux 3.1.0 mipsel
  • Debian Linux 3.1.0 ppc
  • Debian Linux 3.1.0 s/390
  • Debian Linux 3.1.0 sparc
  • Debian Linux 4.0
  • Debian Linux 4.0 alpha
  • Debian Linux 4.0 amd64
  • Debian Linux 4.0 arm
  • Debian Linux 4.0 hppa
  • Debian Linux 4.0 ia-32
  • Debian Linux 4.0 ia-64
  • Debian Linux 4.0 m68k
  • Debian Linux 4.0 mips
  • Debian Linux 4.0 mipsel
  • Debian Linux 4.0 powerpc
  • Debian Linux 4.0 s/390
  • Debian Linux 4.0 sparc
  • Foresight Linux Foresight Linux 1.1
  • Gentoo Linux
  • Linux kernel 2.4.19
  • Linux kernel 2.4.21
  • MandrakeSoft Corporate Server 3.0.0
  • MandrakeSoft Corporate Server 3.0.0 x86_64
  • MandrakeSoft Corporate Server 4.0
  • MandrakeSoft Corporate Server 4.0.0 x86_64
  • MandrakeSoft Linux Mandrake 2007.0
  • MandrakeSoft Linux Mandrake 2007.0 x86_64
  • MandrakeSoft Linux Mandrake 2007.1
  • MandrakeSoft Linux Mandrake 2007.1 x86_64
  • MandrakeSoft Linux Mandrake 2008.0
  • MandrakeSoft Linux Mandrake 2008.0 x86_64
  • Novell Linux Desktop 9
  • Novell Linux POS 9
  • RedHat Desktop 4.0.0
  • RedHat Enterprise Linux 5 server
  • RedHat Enterprise Linux AS 4
  • RedHat Enterprise Linux Desktop 5 client
  • RedHat Enterprise Linux Desktop Workstation 5 client
  • RedHat Enterprise Linux ES 4
  • RedHat Enterprise Linux WS 4
  • RedHat Fedora Core2
  • RedHat Fedora Core3
  • RedHat Fedora Core4
  • RedHat Fedora Core6
  • RedHat Fedora Core7
  • S.u.S.E. Linux 10.0 ppc
  • S.u.S.E. Linux 10.0 x86
  • S.u.S.E. Linux 10.0 x86-64
  • S.u.S.E. Linux 10.1 ppc
  • S.u.S.E. Linux 10.1 x86
  • S.u.S.E. Linux 10.1 x86-64
  • S.u.S.E. Linux Enterprise Server 10.SP1
  • S.u.S.E. Linux Enterprise Server 8
  • S.u.S.E. Open-Enterprise-Server
  • S.u.S.E. SUSE LINUX Retail Solution 8.0.0
  • S.u.S.E. SUSE Linux Enterprise Desktop 10 SP1
  • S.u.S.E. SUSE Linux Enterprise Server 10 SP1
  • S.u.S.E. SuSE Linux Openexchange Server 4.0.0
  • S.u.S.E. SuSE Linux School Server for i386
  • S.u.S.E. SuSE Linux Standard Server 8.0.0
  • S.u.S.E. UnitedLinux 1.0.0
  • S.u.S.E. openSUSE 10.2
  • S.u.S.E. openSUSE 10.3
  • Ubuntu Ubuntu Linux 4.1.0 ia32
  • Ubuntu Ubuntu Linux 4.1.0 ia64
  • Ubuntu Ubuntu Linux 4.1.0 ppc
  • Ubuntu Ubuntu Linux 5.0.0 4 amd64
  • Ubuntu Ubuntu Linux 5.0.0 4 i386
  • Ubuntu Ubuntu Linux 5.0.0 4 powerpc
  • Ubuntu Ubuntu Linux 6.06 LTS amd64
  • Ubuntu Ubuntu Linux 6.06 LTS i386
  • Ubuntu Ubuntu Linux 6.06 LTS powerpc
  • Ubuntu Ubuntu Linux 6.06 LTS sparc
  • Ubuntu Ubuntu Linux 6.10 amd64
  • Ubuntu Ubuntu Linux 6.10 i386
  • Ubuntu Ubuntu Linux 6.10 powerpc
  • Ubuntu Ubuntu Linux 6.10 sparc
  • Ubuntu Ubuntu Linux 7.04 amd64
  • Ubuntu Ubuntu Linux 7.04 i386
  • Ubuntu Ubuntu Linux 7.04 powerpc
  • Ubuntu Ubuntu Linux 7.04 sparc
  • Ubuntu Ubuntu Linux 7.10 amd64
  • Ubuntu Ubuntu Linux 7.10 i386
  • Ubuntu Ubuntu Linux 7.10 powerpc
  • Ubuntu Ubuntu Linux 7.10 sparc
  • Yukihiro Matsumoto Ruby 1.6.0
  • Yukihiro Matsumoto Ruby 1.6.7
  • Yukihiro Matsumoto Ruby 1.6.8
  • Yukihiro Matsumoto Ruby 1.8.0
  • Yukihiro Matsumoto Ruby 1.8.1
  • Yukihiro Matsumoto Ruby 1.8.2
  • Yukihiro Matsumoto Ruby 1.8.2 pre1
  • Yukihiro Matsumoto Ruby 1.8.2 pre2
  • Yukihiro Matsumoto Ruby 1.8.2 pre3
  • Yukihiro Matsumoto Ruby 1.8.2 pre4
  • Yukihiro Matsumoto Ruby 1.8.3
  • Yukihiro Matsumoto Ruby 1.8.4
  • Yukihiro Matsumoto Ruby 1.8.5
  • Yukihiro Matsumoto Ruby 1.8.5-p2
  • Yukihiro Matsumoto Ruby 1.8.6

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.