cve.bz

CVE-2021-31810

5.8 mediumExploit referenceEPSS 3.1%Fix available

Medium (5.8). EPSS 3.1% estimated probability of exploitation activity in the next 30 days.

On this page
An 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).

Severity

CVSS 3.1

5.8 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
EPSS
3.1% (unchanged from 3.0% a week ago; 3.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 88th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-31810 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-31810?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-31810?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-31810 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
ruby-lang:rubythrough 2.6.7
ruby-lang:rubyfrom 2.7.0 through 2.7.3
ruby-lang:rubyfrom 3.0.0 through 3.0.1
debian:debian_linux9.0
oracle:jd_edwards_enterpriseone_toolsbefore 9.2.6.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9ruby2.32.3.3-1+deb9u10DLA-2780-1
Debian10jruby9.1.17.0-3+deb10u1DLA-3408-1
Debian10ruby2.52.5.5-3+deb10u4DSA-5066-1
Debian12, 13, 14jruby9.3.9.0+ds-1DEBIAN-CVE-2021-31810
Ubuntu18.04:LTSruby2.52.5.1-1ubuntu1.10UBUNTU-CVE-2021-31810 USN-5020-1
Ubuntu20.04:LTSruby2.72.7.0-5ubuntu1.5UBUNTU-CVE-2021-31810 USN-5020-1
UbuntuPro:16.04:LTSruby2.32.3.1-2~ubuntu16.04.16+esm1UBUNTU-CVE-2021-31810 USN-5020-1
Red Hatenterprise_linux:8::appstreamruby, ruby-doc, ruby-irb and 5 more0:2.5.9-109.module+el8.5.0+14275+d9c243caRHSA-2022:0672
Red Hatenterprise_linux:8::appstreamruby, ruby-doc, ruby-libs and 5 more0:2.7.4-137.module+el8.4.0+12025+f744ca41RHSA-2021:3020
Red Hatenterprise_linux:8::appstreamruby, ruby-doc, ruby-libs and 4 more0:2.6.9-108.module+el8.5.0+13719+08a8ba32RHSA-2022:0543
Red Hatenterprise_linux:8::appstreamrubygem-abrt, rubygem-abrt-doc0:0.3.0-4.module+el8.1.0+3653+beb38eb0RHSA-2022:0543
Red Hatenterprise_linux:8::appstreamrubygem-abrt, rubygem-abrt-doc0:0.3.0-4.module+el8.1.0+3656+f80bfa1dRHSA-2022:0672
Red Hatenterprise_linux:8::appstreamrubygem-abrt, rubygem-abrt-doc0:0.4.0-1.module+el8.3.0+7192+4e3a532aRHSA-2021:3020
Red Hatenterprise_linux:8::appstreamrubygem-bigdecimal, rubygem-bigdecimal-debuginfo0:1.3.4-109.module+el8.5.0+14275+d9c243caRHSA-2022:0672
Red Hatenterprise_linux:8::appstreamrubygem-bigdecimal, rubygem-bigdecimal-debuginfo0:1.4.1-108.module+el8.5.0+13719+08a8ba32RHSA-2022:0543
Red Hatenterprise_linux:8::appstreamrubygem-bigdecimal, rubygem-bigdecimal-debuginfo0:2.0.0-137.module+el8.4.0+12025+f744ca41RHSA-2021:3020
Red Hatenterprise_linux:8::appstreamrubygem-bson, rubygem-bson-doc, rubygem-bson-debuginfo and 1 more0:4.3.0-2.module+el8.1.0+3656+f80bfa1dRHSA-2022:0672
Red Hatenterprise_linux:8::appstreamrubygem-bson, rubygem-bson-doc, rubygem-bson-debuginfo and 1 more0:4.5.0-1.module+el8.1.0+3653+beb38eb0RHSA-2022:0543
Red Hatenterprise_linux:8::appstreamrubygem-bson, rubygem-bson-doc, rubygem-bson-debuginfo and 1 more0:4.8.1-1.module+el8.3.0+7192+4e3a532aRHSA-2021:3020
172 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 19 moreruby2.52.5.9-150000.4.23.1SUSE-SU-2022:1512-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 10 moreruby2.52.5.9-4.20.1SUSE-SU-2021:3838-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 11 moreruby2.12.1.9-19.6.1SUSE-SU-2021:3837-1
SUSEWebYast 1.3ruby1.8.7.p357-0.9.20.3.1SUSE-SU-2022:15034-1
openSUSELeap 15.2ruby2.52.5.9-lp152.2.9.1openSUSE-SU-2021:1535-1
openSUSELeap 15.3ruby2.52.5.9-4.20.1openSUSE-SU-2021:3838-1
openSUSELeap 15.3, Leap 15.4ruby2.52.5.9-150000.4.23.1SUSE-SU-2022:1512-1
openSUSETumbleweedruby2.72.7.4-1.1openSUSE-SU-2024:11622-1
openSUSETumbleweedruby3.03.0.2-1.1openSUSE-SU-2024:11623-1
openSUSETumbleweedruby3.13.1.0-1.1openSUSE-SU-2024:11786-1
openSUSETumbleweedruby3.23.2.1-1.1openSUSE-SU-2024:12712-1
openSUSETumbleweedruby3.33.3.0-1.2openSUSE-SU-2024:13623-1
openSUSETumbleweedruby3.43.4.1-1.1openSUSE-SU-2025:14621-1
openSUSETumbleweedruby4.04.0.0~preview2-1.1openSUSE-SU-2025:15819-1
AlmaLinux8ruby, ruby-doc, ruby-irb and 2 more2.5.9-109.module_el8.5.0+259+8cec6917ALSA-2022:0672
AlmaLinux8ruby, ruby-doc, ruby-irb and 2 more2.5.9-109.module_el8.5.0+2627+d9c243caALSA-2022:0672
AlmaLinux8ruby, ruby-doc, ruby-libs and 1 more2.6.9-108.module_el8.5.0+250+ba22dbf7ALSA-2022:0543
AlmaLinux8ruby, ruby-doc, ruby-libs and 1 more2.6.9-108.module_el8.5.0+2623+08a8ba32ALSA-2022:0543
AlmaLinux8ruby, ruby-doc, ruby-libs and 2 more2.7.4-137.module_el8.4.0+2515+f744ca41ALSA-2021:3020
AlmaLinux8ruby, ruby-libs, ruby-devel2.7.4-137.module_el8.5.0+117+35d1289bALSA-2021:3020
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.3.0-4.module_el8.5.0+259+8cec6917ALSA-2022:0543
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.3.0-4.module_el8.5.0+2623+08a8ba32ALSA-2022:0543 ALSA-2022:0672
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.3.0-4.module_el8.5.0+2625+ec418553ALSA-2022:0672
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.4.0-1.module_el8.3.0+6147+d0dfc1e4ALSA-2021:3020
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.4.0-1.module_el8.4.0+2399+4e3a532aALSA-2021:3020
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.4.0-1.module_el8.5.0+118+1ab773e1ALSA-2021:3020
83 more for AlmaLinux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat CloudForms 5.11 does not ship Ruby or RubyGem net-ftp and thus not affected by the flaw. RubyGem net-sftp (Ruby implementation of Secure File Transfer Protocol) which product ship is different library component from the affected package.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8ruby:2.7-8040020210728141159.522a0ee4Fixed 2021-08-05RHSA-2021:3020
Red Hat Enterprise Linux 8ruby:2.6-8050020211215144356.c5368500Fixed 2022-02-16RHSA-2022:0543
Red Hat Enterprise Linux 8ruby:2.5-8050020220216195847.c5368500Fixed 2022-02-24RHSA-2022:0672
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionsruby:2.6-8010020220201152941.c27ad7f8Fixed 2022-02-21RHSA-2022:0581
Red Hat Enterprise Linux 8.2 Extended Update Supportruby:2.6-8020020220201131207.4cda2c84Fixed 2022-02-21RHSA-2022:0582
Red Hat Enterprise Linux 8.4 Extended Update Supportruby:2.6-8040020220131135901.522a0ee4Fixed 2022-02-16RHSA-2022:0544
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-ruby27-ruby-0:2.7.4-130.el7Fixed 2021-09-20RHSA-2021:3559
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-ruby30-ruby-0:3.0.2-148.el7Fixed 2021-10-25RHSA-2021:3982
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-ruby26-ruby-0:2.6.9-120.el7Fixed 2022-02-28RHSA-2022:0708
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-ruby27-ruby-0:2.7.4-130.el7Fixed 2021-09-20RHSA-2021:3559
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-ruby30-ruby-0:3.0.2-148.el7Fixed 2021-10-25RHSA-2021:3982
Red Hat Hardened Imagesruby3-3-main-3.3.10-23.1.hum1Fixed 2026-04-09RHSA-2026:7305
Red Hat Hardened Imagesruby3-4-main-3.4.8-31.1.hum1Fixed 2026-04-09RHSA-2026:7307
Red Hat Hardened Imagesruby4-0-main-4.0.0-33.3.hum1Fixed 2026-04-17RHSA-2026:8838
Red Hat Enterprise Linux 6rubyOut of support scope
Red Hat Enterprise Linux 7rubyOut of support scope
Red Hat Enterprise Linux 9rubyNot affected
Red Hat Hardened ImagesrubyAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-31810.

References

Check your stackJSON