REDHAT-BUG-1692512: Medium severity Ruby RubyGems vulnerability
A Directory Traversal issue was discovered in RubyGems 2.7.6 and later through 3.0.2. Before making new directories or touching files (which now include path-checking code for symlinks), it would delete the target destination. If that destination was hidden behind a symlink, a malicious gem could delete arbitrary files on the user’s machine, presuming the attacker could guess at paths. Given how frequently gem is run as sudo, and how predictable paths are on modern systems (/tmp, /usr, etc.), this could likely lead to data loss or an unusable system.
Upstream patch:
https://bugs.ruby-lang.org/attachments/7669
References:
https://www.ruby-lang.org/en/news/2019/03/05/multiple-vulnerabilities-in-rubygems/ https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-1692512?
The severity of REDHAT-BUG-1692512 is classified as critical due to the potential for directory traversal attacks.
How do I fix REDHAT-BUG-1692512?
To fix REDHAT-BUG-1692512, upgrade RubyGems to version 3.0.3 or later to ensure path-checking code is applied.
Which versions of RubyGems are affected by REDHAT-BUG-1692512?
RubyGems versions from 2.7.6 to 3.0.2 inclusive are affected by REDHAT-BUG-1692512.
What kind of attack can exploit REDHAT-BUG-1692512?
REDHAT-BUG-1692512 can be exploited for directory traversal attacks which may allow unauthorized access to files.
Is REDHAT-BUG-1692512 related to symlink vulnerabilities?
Yes, REDHAT-BUG-1692512 involves vulnerabilities associated with symlinks that can lead to the deletion of target destinations.