Skip to main content
MEDIUM

CVE-2021-31810

CVSS v3

5.8

MEDIUM

EPSS Score

3.0 %

exploit probability, as of 2026-10-18

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for ruby.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • rubyBitnamiall versions · fixed in 2.6.8and 1 other package
  • rubyAlmaLinux:8all versions · fixed in 2.5.9-109.module_el8.5.0+259+8cec6917and 3 other packages
  • ruby-default-gemsAlmaLinux:8all versions · fixed in 2.7.4-137.module_el8.4.0+2515+f744ca41
  • ruby-irbAlmaLinux:8all versions · fixed in 2.5.9-109.module_el8.5.0+2627+d9c243ca
  • rubygem-abrtAlmaLinux:8all versions · fixed in 0.3.0-4.module_el8.5.0+2623+08a8ba32
  • rubygem-abrt-docAlmaLinux:8all versions · fixed in 0.3.0-4.module_el8.5.0+2625+ec418553
  • rubygem-bigdecimalAlmaLinux:8all versions · fixed in 1.3.4-109.module_el8.5.0+259+8cec6917
  • rubygem-bsonAlmaLinux:8all versions · fixed in 4.3.0-2.module_el8.5.0+259+8cec6917

21 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-31810 Red Hat Product Security1,093 products fixed · 27 known affected

    ruby: FTP PASV command response can cause Net::FTP to connect to arbitrary host

    ruby as a component of Red Hat Enterprise Linux 6 · ruby-devel as a component of Red Hat Enterprise Linux 6 · ruby-docs as a component of Red Hat Enterprise Linux 6

  • RHSA-2026:8838 Red Hat Product Security13 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

  • RHSA-2026:7307 Red Hat Product Security13 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

  • RHSA-2026:7305 Red Hat Product Security13 products fixed

    Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

  • RHSA-2022:0708 Red Hat Product Security64 products fixed

    Red Hat Security Advisory: rh-ruby26-ruby security, bug fix, and enhancement update

  • RHSA-2022:0672 Red Hat Product Security144 products fixed

    Red Hat Security Advisory: ruby:2.5 security update

7 more advisories

Full record on NVD

Description

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).

Technical details

Published
2021-07-13

Frequently asked questions

What is CVE-2021-31810?

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).

Is CVE-2021-31810 actively exploited?

Active exploitation of CVE-2021-31810 has not been confirmed. Its EPSS score was 3.0% on 2026-10-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-31810?

CVE-2021-31810 has a CVSS v3 base score of 5.8 (MEDIUM severity).

Running ruby? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month