CVE-2021-31810Ruby-lang Ruby
Medium 5.8 No auth needed
Follow: this CVE · Ruby-lang · Ruby-lang Ruby We alert you by email or Slack (account required).
- Priority
- 50
- CVSS 3.1
- 5.8
- EPSS
- 3.1% probability of exploitation in 30 days · percentile 88
- Auth required
- No
- Published
- Jul 13, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
What happens
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).
What to do
- Apply the vendor's security update for Ruby.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ruby-lang | ruby | ≤ 2.6.7 |
| ruby-lang | ruby | ≥ 2.7.0 ≤ 2.7.3 |
| ruby-lang | ruby | ≥ 3.0.0 ≤ 3.0.1 |
| debian | debian_linux | 9.0 |
| oracle | jd_edwards_enterpriseone_tools | < 9.2.6.1 |
Official advisories
- Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update · Red Hat · RHSA-2026:8838 · Apr 21, 2026 Critical
- Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update · Red Hat · RHSA-2026:7305 · Apr 21, 2026 Critical
- Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update · Red Hat · RHSA-2026:7307 · Apr 21, 2026 Critical
- libruby4_0-4_0-4.0.0~preview2-1.1 on GA media · SUSE · openSUSE-SU-2025:15819-1 · Dec 12, 2025 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- hackerone.com Exploit Patch Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org
- lists.fedoraproject.org
- security.gentoo.org
- security.netapp.com Third Party Advisory
- www.oracle.com Patch Third Party Advisory
- www.ruby-lang.org Vendor Advisory