PT-2021-4038 · Ruby+9 · Ruby+9

Published

2021-04-02

·

Updated

2025-12-12

·

CVE-2021-31810

CVSS v2.0

7.8

High

VectorAV:N/AC:L/Au:N/C:C/I:N/A:N
Name of the Vulnerable Software and Affected Versions Ruby versions prior to 2.6.8 Ruby versions 2.7.x through 2.7.3 Ruby versions 3.x through 3.0.1
Description The issue is related to the implementation of the Net::FTP class in the Ruby interpreter, which has weaknesses in protecting service data using the PASV command. A malicious FTP server can use the PASV response to trick Net::FTP into connecting back to a given IP address and port, potentially allowing an attacker to extract information about private services, conduct port scans, and service banner extractions.
Recommendations For Ruby versions prior to 2.6.8, update to version 2.6.8 or later. For Ruby versions 2.7.x through 2.7.3, update to version 2.7.4 or later. For Ruby versions 3.x through 3.0.1, update to version 3.0.2 or later. As a temporary workaround, consider restricting the use of the Net::FTP class until a patch is available.

Exploit

Fix

Information Disclosure

Weakness Enumeration

Related Identifiers

ALSA-2021:3020
ALSA-2022:0543
ALSA-2022:0672
BDU:2021-04565
BIT-RUBY-2021-31810
BIT-RUBY-MIN-2021-31810
CESA-2021_3020
CESA-2022_0543
CESA-2022_0672
CVE-2021-31810
DLA-2780-1
DLA-3408-1
DSA-5066-1
MGASA-2021-0579
OESA-2021-1306
OPENSUSE-SU-2021:1535-1
OPENSUSE-SU-2021:3838-1
OPENSUSE-SU-2021_1535-1
OPENSUSE-SU-2021_3838-1
OPENSUSE-SU-2022_1512-1
OPENSUSE-SU-2024:11622-1
OPENSUSE-SU-2024:11623-1
OPENSUSE-SU-2024:11786-1
OPENSUSE-SU-2024:12712-1
OPENSUSE-SU-2024:13623-1
OPENSUSE-SU-2025:14621-1
OPENSUSE-SU-2025:15819-1
RHSA-2021:3020
RHSA-2021:3559
RHSA-2021:3982
RHSA-2021_3020
RHSA-2022:0543
RHSA-2022:0544
RHSA-2022:0581
RHSA-2022:0582
RHSA-2022:0672
RHSA-2022:0708
RHSA-2022_0543
RHSA-2022_0672
RHSA-2026:7305
RHSA-2026:7307
RHSA-2026:8838
RLSA-2021:3020
RLSA-2022:0543
RLSA-2022:0672
SUSE-SU-2021:3837-1
SUSE-SU-2021:3838-1
SUSE-SU-2022:15034-1
SUSE-SU-2022:1512-1
SUSE-SU-2022_1512-1
USN-5020-1

Affected Products

Almalinux
Astra Linux
Centos
Linuxmint
Red Hat
Red Os
Rocky Linux
Ruby
Suse
Ubuntu