Name
ruby
Version
3.1.3
Type
library
Description
An interpreter of object-oriented scripting language
Licenses
Ruby | BSD-2-Clause | BSD-3-Clause | GPL-2.0-only | ISC | MIT
PURL
-
CPE
cpe:2.3:*:ruby-lang:ruby:3.1.3:*:*:*:*:*:*:*
Other Versions#
Patches#
#
Title
Author
Resolve
1
Add position check for XML declaration (#162)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-41123
2
Filter out __has_include* compiler defines
Khem Raj <raj.khem@gmail.com>
3
Add missing encode for custom term
Sutou Kouhei <kou@clear-code.com>
CVE-2024-41123
4
extmk: fix cross-compilation of external gems
=?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
5
Truncate userinfo with URI#join, URI#merge and URI#+
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2025-27221
6
ruby: Fix quadratic backtracking on invalid port number
Nobuyoshi Nakada <nobu@ruby-lang.org>
CVE-2023-36617
7
Fix source.match performance without specifying term string
tomoya ishida <tomoyapenguin@gmail.com>
CVE-2024-41123
8
CVE-2023-28756
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2023-28756
9
parser: fix a bug that �x...; is accepted as a character
Sutou Kouhei <kou@clear-code.com>
CVE-2024-49761
10
Fix Use-After-Free issue for Regexp
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2024-27282
11
Use string scanner with baseparser (#105)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
12
Change loop in parse_attributes to `while true`. (#109)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
13
template/Makefile.in: do not write host cross-cc items into
Alexander Kanavin <alex.kanavin@gmail.com>
14
Escape/unescape unclosed tags as well
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2025-27220
15
rdoc: build reproducible documentation
Christian Hofstaedtler <zeha@debian.org>
16
Add a "malformed comment" check for top-level comments (#145)
Hiroya Fujinami <make.just.on@gmail.com>
CVE-2024-39908
17
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
18
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
19
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
20
Fix expanding size at ungetc/ungetbyte
Nobuyoshi Nakada <nobu@ruby-lang.org>
CVE-2024-27280
21
Fix merger of URI with authority component
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2025-27221
22
parser tree: improve namespace conflicted attribute check
Sutou Kouhei <kou@clear-code.com>
CVE-2024-43398
23
Merge URI-0.12.1
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2023-28755
24
Add support for XML entity expansion limitation in SAX and
NAITOH Jun <naitoh@gmail.com>
CVE-2024-41946
25
Make gemspecs reproducible
Lucas Kanashiro <kanashiro@debian.org>
26
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
27
ruby: Fix quadratic backtracking on invalid relative URI
Nobuyoshi Nakada <nobu@ruby-lang.org>
CVE-2023-36617
28
parse pi: improve invalid case detection
Sutou Kouhei <kou@clear-code.com>
CVE-2024-41123
29
Fix method scope in test in order to invoke the tests
Watson <watson1978@gmail.com>
CVE-2024-41123
30
Use `@scanner << readline` instead of `@scanner.string =
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
31
Read quoted attributes in chunks (#126)
Nobuyoshi Nakada <nobu@ruby-lang.org>
CVE-2024-35176
32
Reduce calls to `Source#buffer`(`StringScanner#rest`) (#106)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
33
Reduce calls to StringScanner.new() (#108)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
34
Filter marshaled objets
Nobuyoshi Nakada <nobu@ruby-lang.org>
CVE-2024-27281
35
Obey LDFLAGS for the link of libruby
Christopher Larson <chris_larson@mentor.com>
36
Optimize the parse_attributes method to use `Source#match`
NAITOH Jun <naitoh@gmail.com>
CVE-2024-43398
37
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
38
Make gemspecs reproducible
Lucas Kanashiro <kanashiro@debian.org>
39
Fix ReDoS caused by very large character references using
Watson <watson1978@gmail.com>
CVE-2024-39908
40
parser: keep the current namespaces instead of stack of Set
Sutou Kouhei <kou@clear-code.com>
CVE-2024-43398
41
Remove unnecessary checks in baseparser (#112)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
42
Add support for old strscan
Sutou Kouhei <kou@clear-code.com>
CVE-2024-39908
43
Use String#concat instead of String#+ for reducing cpu usage
Hiroshi SHIBATA <hsbt@ruby-lang.org>
CVE-2025-27219
44
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
45
vm_dump.c: Define REG_S1 and REG_S2 for musl/riscv
Khem Raj <raj.khem@gmail.com>
46
Optimize BaseParser#unnormalize method (#158)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
47
Remove `Source#string=` method (#117)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-39908
48
Fix performance issue caused by using repeated `>` characters
Watson <watson1978@gmail.com>
CVE-2024-39908
49
template/Makefile.in: filter out -f*prefix-map
Tony Battersby <tonyb@cybernetics.com>
50
Fix ReDoS by using repeated space characters inside
Watson <watson1978@gmail.com>
CVE-2024-39908
51
Use more StringScanner based API to parse XML (#114)
NAITOH Jun <naitoh@gmail.com>
CVE-2024-49761
52
lib/mkmf.rb: sort list of object files in generated Makefile
Reiner Herrmann <reiner@reiner-h.de>
Vulnerabilities#
Name
Analysis
Description
Patched
In the URI gem before 1.0.3 for Ruby, the URI handling methods (URI.join, URI#merge, URI#+) have an inadvertent leakage of authentication credentials because userinfo is retained even after changing the host.
Patched
In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.
Patched
In the CGI gem before 0.4.2 for Ruby, the CGI::Cookie.parse method in the CGI library contains a potential Denial of Service (DoS) vulnerability. The method does not impose any limit on the length of the raw cookie value it processes. This oversight can lead to excessive resource consumption when parsing extremely large cookies.
Patched
REXML is an XML toolkit for Ruby. The REXML gem before 3.3.9 has a ReDoS vulnerability when it parses an XML that has many digits between &# and x...; in a hex numeric character reference (&#x...;). This does not happen with Ruby 3.2 or later. Ruby 3.1 is the only affected maintained Ruby. The REXML gem 3.3.9 or later include the patch to fix the vulnerability.
Patched
REXML is an XML toolkit for Ruby. The REXML gem before 3.3.6 has a DoS vulnerability when it parses an XML that has many deep elements that have same local name attributes. If you need to parse untrusted XMLs with tree parser API like REXML::Document.new, you may be impacted to this vulnerability. If you use other parser APIs such as stream parser API and SAX2 parser API, this vulnerability is not affected. The REXML gem 3.3.6 or later include the patch to fix the vulnerability.
Patched
REXML is an XML toolkit for Ruby. The REXML gem 3.3.2 has a DoS vulnerability when it parses an XML that has many entity expansions with SAX2 or pull parser API. The REXML gem 3.3.3 or later include the patch to fix the vulnerability.
Patched
REXML is an XML toolkit for Ruby. The REXML gem before 3.3.2 has some DoS vulnerabilities when it parses an XML that has many specific characters such as whitespace character, `>]` and `]>`. The REXML gem 3.3.3 or later include the patches to fix these vulnerabilities.
Patched
REXML is an XML toolkit for Ruby. The REXML gem before 3.3.1 has some DoS vulnerabilities when it parses an XML that has many specific characters such as `<`, `0` and `%>`. If you need to parse untrusted XMLs, you many be impacted to these vulnerabilities. The REXML gem 3.3.2 or later include the patches to fix these vulnerabilities. Users are advised to upgrade. Users unable to upgrade should avoid parsing untrusted XML strings.
Patched
REXML is an XML toolkit for Ruby. The REXML gem before 3.2.6 has a denial of service vulnerability when it parses an XML that has many `<`s in an attribute value. Those who need to parse untrusted XMLs may be impacted to this vulnerability. The REXML gem 3.2.7 or later include the patch to fix this vulnerability. As a workaround, don't parse untrusted XMLs.
Patched
An issue was discovered in Ruby 3.x through 3.3.0. If attacker-supplied data is provided to the Ruby regex compiler, it is possible to extract arbitrary heap data relative to the start of the text, including pointers and sensitive strings. The fixed versions are 3.0.7, 3.1.5, 3.2.4, and 3.3.1.
Patched
An issue was discovered in RDoc 6.3.3 through 6.6.2, as distributed in Ruby 3.x through 3.3.0. When parsing .rdoc_options (used for configuration in RDoc) as a YAML file, object injection and resultant remote code execution are possible because there are no restrictions on the classes that can be restored. (When loading the documentation cache, object injection and resultant remote code execution are also possible if there were a crafted cache.) The main fixed version is 6.6.3.1. For Ruby 3.0 users, a fixed version is rdoc 6.3.4.1. For Ruby 3.1 users, a fixed version is rdoc 6.4.1.1. For Ruby 3.2 users, a fixed version is rdoc 6.5.1.1.
Patched
A buffer-overread issue was discovered in StringIO 3.0.1, as distributed in Ruby 3.0.x through 3.0.6 and 3.1.x through 3.1.4. The ungetbyte and ungetc methods on a StringIO can read past the end of a string, and a subsequent call to StringIO.gets may return the memory value. 3.0.3 is the main fixed version; however, for Ruby 3.0 users, a fixed version is stringio 3.0.1.1, and for Ruby 3.1 users, a fixed version is stringio 3.0.1.2.
Patched
A ReDoS issue was discovered in the URI component before 0.12.2 for Ruby. The URI parser mishandles invalid URLs that have specific characters. There is an increase in execution time for parsing strings to URI objects with rfc2396_parser.rb and rfc3986_parser.rb. NOTE: this issue exists becuse of an incomplete fix for CVE-2023-28755. Version 0.10.3 is also a fixed version.
Patched
A ReDoS issue was discovered in the Time component through 0.2.1 in Ruby through 3.2.1. The Time parser mishandles invalid URLs that have specific characters. It causes an increase in execution time for parsing strings to Time objects. The fixed versions are 0.1.1 and 0.2.2.
Patched
A ReDoS issue was discovered in the URI component through 0.12.0 in Ruby through 3.2.1. The URI parser mishandles invalid URLs that have specific characters. It causes an increase in execution time for parsing strings to URI objects. The fixed versions are 0.12.1, 0.11.1, 0.10.2 and 0.10.0.1.
Exploitable
RubyGems.org is the Ruby community gem host. A bug in password & email change confirmation code allowed an attacker to change their RubyGems.org account's email to an unowned email address. Having access to an account whose email has been changed could enable an attacker to save API keys for that account, and when a legitimate user attempts to create an account with their email (and has to reset password to gain access) and is granted access to other gems, the attacker would then be able to publish and yank versions of those gems. Commit number 90c9e6aac2d91518b479c51d48275c57de492d4d contains a patch for this issue.