CVE-2021-31810

NameCVE-2021-31810
DescriptionAn issue was discovered in Ruby through 2.6.7, 2.7.x through 2.7.3, and 3.x through 3.0.1. A malicious FTP server can use the PASV response to trick Net::FTP into connecting back to a given IP address and port. This potentially makes curl extract information about services that are otherwise private and not disclosed (e.g., the attacker can conduct port scans and service banner extractions).
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2780-1, DLA-3408-1, DSA-5066-1, ELA-495-1
Debian Bugs990815, 1014818

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
jruby (PTS)jessie, jessie (lts)1.5.6-9+deb8u2vulnerable
stretch (security), stretch (lts), stretch1.7.26-1+deb9u3vulnerable
buster9.1.17.0-3vulnerable
buster (security)9.1.17.0-3+deb10u1fixed
bookworm9.3.9.0+ds-8fixed
sid, trixie9.4.6.0+ds-1.1fixed
ruby2.1 (PTS)jessie, jessie (lts)2.1.5-2+deb8u13fixed
ruby2.3 (PTS)stretch (security), stretch (lts), stretch2.3.3-1+deb9u11fixed
ruby2.5 (PTS)buster2.5.5-3+deb10u4fixed
buster (security)2.5.5-3+deb10u6fixed
ruby2.7 (PTS)bullseye (security), bullseye2.7.4-1+deb11u1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
jrubysourcejessie(unfixed)end-of-life
jrubysourcebuster9.1.17.0-3+deb10u1DLA-3408-1
jrubysource(unstable)9.3.9.0+ds-11014818
ruby2.1sourcejessie2.1.5-2+deb8u12ELA-495-1
ruby2.1source(unstable)(unfixed)
ruby2.3sourcestretch2.3.3-1+deb9u10DLA-2780-1
ruby2.3source(unstable)(unfixed)
ruby2.5sourcebuster2.5.5-3+deb10u4DSA-5066-1
ruby2.5source(unstable)(unfixed)
ruby2.7source(unstable)2.7.4-1990815

Notes

[stretch] - jruby <no-dsa> (Minor issue)
https://www.ruby-lang.org/en/news/2021/07/07/trusting-pasv-responses-in-net-ftp/
https://github.com/ruby/ruby/commit/3ca1399150ed4eacfd2fe1ee251b966f8d1ee469 (2.7)

Search for package or bug name: Reporting problems