Path traversal in Ruby - CVE-2021-28966

 

Path traversal in Ruby - CVE-2021-28966

Published: April 8, 2021


Vulnerability identifier: #VU52001
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-28966
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences in tmpdir library. A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.


Affected software

Ruby
ruby (Alpine package)

How to mitigate CVE-2021-28966

Install updates from vendor's website.

Ruby - addressed in versions 2.7.3, 3.0.1
ruby (Alpine package) - update to 2.7.3-r0

External References

Related Security Bulletins