CVE-2007-5162
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…
Check your servers for CVE-2007-5162
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2007-5162 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 1.68%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 77.3% of all scored CVEs. Scores of 28 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
n/a
n/a
|
affected all versions
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2007-5162 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2007-5162RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2007-5162Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2007-5162
trivy image --scanners vuln IMAGE | grep CVE-2007-5162
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=13499 svn.ruby-lang.org
- 27576 secunia.com · third party advisory
- 26985 secunia.com · third party advisory
- USN-596-1 ubuntu.com · vendor advisory
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=13500 svn.ruby-lang.org
- FEDORA-2007-2685 redhat.com · vendor advisory
- 27044 secunia.com · third party advisory
- RHSA-2007:0961 redhat.com · vendor advisory
- RHSA-2007:0965 redhat.com · vendor advisory
- 27756 secunia.com · third party advisory
- DSA-1412 debian.org · vendor advisory
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=13502 svn.ruby-lang.org
15 more
- 27673 secunia.com · third party advisory
- DSA-1410 debian.org · vendor advisory
- 27769 secunia.com · third party advisory
- FEDORA-2007-718 redhat.com · vendor advisory
- SUSE-SR:2007:024 novell.com · vendor advisory
- MDVSA-2008:029 mandriva.com · vendor advisory
- 29556 secunia.com · third party advisory
- 27818 secunia.com · third party advisory
- 27432 secunia.com · third party advisory
- 3180 securityreason.com · third party advisory
- FEDORA-2007-2406 redhat.com · vendor advisory
- 28645 secunia.com · third party advisory
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=13504 svn.ruby-lang.org
- DSA-1411 debian.org · vendor advisory
- 27764 secunia.com · third party advisory
Other references
- 25847 securityfocus.com · vdb entry
- 20071112 FLEA-2007-0068-1 ruby securityfocus.com · mailing list
- ADV-2007-3340 vupen.com · vdb entry
- ruby-nethttps-mitm(36861) exchange.xforce.ibmcloud.com · vdb entry
- https://bugzilla.redhat.com/show_bug.cgi?id=313791 bugzilla.redhat.com
- http://www.isecpartners.com/advisories/2007-006-rubyssl.txt isecpartners.com
- oval:org.mitre.oval:def:10738 oval.cisecurity.org · vdb entry, signature
- 20070927 Ruby Net::HTTPS library does not validate server certificate CN securityfocus.com · mailing list
Source: the record CVE-2007-5162 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse