{"id":"CVE-2021-31810","details":"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).","aliases":["BIT-ruby-2021-31810","BIT-ruby-min-2021-31810"],"modified":"2026-10-24T10:36:35.215940674Z","published":"2021-07-13T13:15:09.243Z","related":["ALSA-2021:3020","ALSA-2022:0543","ALSA-2022:0672","SUSE-SU-2021:3837-1","SUSE-SU-2021:3838-1","SUSE-SU-2022:15034-1","SUSE-SU-2022:1512-1","openSUSE-SU-2021:1535-1","openSUSE-SU-2021:3838-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"],"database_specific":{"unresolved_ranges":[{"extracted_events":[{"range":[{"fixed":"9.2.6.1"}],"source":"CPE_RANGE"}],"vendor_product":"oracle:jd_edwards_enterpriseone_tools","cpes":["cpe:2.3:a:oracle:jd_edwards_enterpriseone_tools:*:*:*:*:*:*:*:*"]},{"extracted_events":[{"range":[{"introduced":"9.0"},{"last_affected":"9.0"}],"source":"CPE_STRING"}],"vendor_product":"debian:debian_linux","cpes":["cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"]}]},"references":[{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/04/msg00033.html"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MWXHK5UUHVSHF7HTHMX6JY3WXDVNIHSL/"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2021/10/msg00009.html"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202401-27"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20210917-0001/"},{"type":"ADVISORY","url":"https://www.ruby-lang.org/en/news/2021/07/07/trusting-pasv-responses-in-net-ftp/"},{"type":"FIX","url":"https://hackerone.com/reports/1145454"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpuapr2022.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/ruby/ruby","events":[{"introduced":"0"},{"last_affected":"930143880a8b593e7444b94e2e0522b83a25c671"},{"introduced":"647ee6f091eafcce70ffb75ddf7e121e192ab217"},{"last_affected":"6847ee089d7655b2a0eea4fee3133aeacd4cc7cc"},{"introduced":"95aff214687a5e12c3eb57d056665741e734c188"},{"last_affected":"0fb782ee38ea37fd5fe8b1f775f8ad866a82a3f0"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"0"},{"last_affected":"2.6.7"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*"},{"range":[{"introduced":"2.7.0"},{"last_affected":"2.7.3"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*"},{"source":"CPE_RANGE","cpe":"cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*","range":[{"introduced":"3.0.0"},{"last_affected":"3.0.1"}]}]}}],"versions":["v3_0_1","v2_7_3","v2_6_7","v3_0_0","v2_7_2","v2_7_1","v2_7_0","v1_0_r2"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-31810.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N"}]}