[Ruby] Ruby 3.0.2 Released

Ruby 3.0.2 has been released.

This release includes security fixes. Please check the topics below for details.

Installation

1
2
3
4
5
6
7
# Via asdf
$ asdf plugin update ruby
$ asdf install ruby 3.0.2

# Via RVM
$ rvm get head
$ rvm install ruby 3.0.2

Or via Docker

1
2
ARG VERSION=3.0.2
FROM ruby:${VERSION}

CVE-2021-31799: A command injection vulnerability in RDoc

RDoc used to call Kernel#open to open a local file. If a Ruby project has a file whose name starts with | and ends with tags, the command following the pipe character is executed. A malicious Ruby project could exploit it to run an arbitrary command execution against a user who attempts to run rdoc command.

Ruby users whose version of RDoc is affected by this issue should update to the latest version of RDoc.

Run the following command to update RDoc to the latest version (6.3.1 or later) to fix the vulnerability.

1
$ gem install rdoc

If you are using bundler, please add gem "rdoc", ">= 6.3.1" to your Gemfile.

CVE-2021-31799: A command injection vulnerability in RDoc - https://www.ruby-lang.org/en/news/2021/05/02/os-command-injection-in-rdoc/

References

[1] Ruby 3.0.2 Released - https://www.ruby-lang.org/en/news/2021/07/07/ruby-3-0-2-released

[2] asdf-vm/asdf: Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more - https://github.com/asdf-vm/asdf

[3] asdf-vm/asdf-ruby: Ruby plugin for asdf version manager - https://github.com/asdf-vm/asdf-ruby

[4] RVM: Ruby Version Manager - Installing RVM - https://rvm.io/rvm/install#installation

[5] Docker Hub - https://hub.docker.com/_/ruby