CVE-2023-36617: Uri Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-hww2-5g85-429m
CVSS 5.3
CWE-1333
Published
Advisory Summary

CVE-2023-36617 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Uri libraries in the RubyGems ecosystem. The issue involves uri gem has redos vulnerability. Remediation is available by upgrading affected packages to version 0.10.3, 0.12.2, 0.11.2, 0.10.0.3.

CVE-2023-36617 at a Glance

CVE Identifier CVE-2023-36617
GHSA Identifier GHSA-hww2-5g85-429m
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Uri
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2023-36617

To remediate this vulnerability, upgrade all affected Uri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

uri fixed: 0.10.3
Upgrade uri to 0.10.3
uri fixed: 0.12.2
Upgrade uri to 0.12.2
uri fixed: 0.11.2
Upgrade uri to 0.11.2
uri fixed: 0.10.0.3
Upgrade uri to 0.10.0.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for uri

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-36617, inspect your project dependencies for Uri:

inspect dependencies for uri

Analyze the terminal output to locate any version of Uri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Uri, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. [The Ruby advisory recommends](https://www.ruby-lang.org/en/news/2023/06/29/redos-in-uri-CVE-2023-36617/) updating the uri gem to 0.12.2. In order to ensure compatibility with the bundled version in older Ruby series, you may update as follows instead: - For Ruby 3.0: Update to uri 0.10.3 - For Ruby 3.1 and 3.2: Update to uri 0.12.2. You can use gem update uri to update it. If you are using bundler, please add gem `uri`, `>= 0.12.2` (or other version mentioned above) to your Gemfile.

CVE-2023-36617 Affected Uri Versions

4 component(s)
Fixed Versions:
0.10.30.12.20.11.20.10.0.3
Product / Package Ecosystem Affected Versions Fixed Version
uri
RubyGems
≥ 0.10.1
< 0.10.3
0.10.3
uri
RubyGems
≥ 0.12.0
< 0.12.2
0.12.2
uri
RubyGems
≥ 0.11.0
< 0.11.2
0.11.2
uri
RubyGems
< 0.10.0.3
0.10.0.3

References

NVD — CVE-2023-36617 NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-36617
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/05b1e7d026b886e65a60ee35625229da9ec220bb
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/38bf797c488bcb4a37fb322bfa84977981863ec6
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/3cd938df20db26c9439e9f681aadfb9bbeb6d1c0
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/4d02315181d8a485496f1bb107a6ab51d6f3a35f
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/70794abc162bb15bb934713b5669713d6700d35c
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/7e33934c91b7f8f3ea7b7a4258b468e19f636bc3
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/9a8e0cc03da964054c2a4ea26b59c53c3bae4921
Security Fix Commit FIX COMMIT
https://github.com/ruby/uri/commit/ba36c8a3ecad8c16dd3e60a6da9abd768206c8fa
www.ruby-lang.org/en/news/2023/06/29/... WEB
https://www.ruby-lang.org/en/news/2023/06/29/redos-in-uri-CVE-2023-36617
Uri Security Information SECURITY
https://security.netapp.com/advisory/ntap-20230725-0002
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QA6XUKUY7B5OLNQBLHOT43UW7C5NIOQQ
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html
Uri Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2023-36617.yml
Uri Source Repository REPOSITORY
https://github.com/ruby/uri

Frequently Asked Questions

What is CVE-2023-36617?
CVE-2023-36617 is a security vulnerability in Uri involving URI gem has ReDoS vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which Uri versions are affected?
Affected versions include releases prior to 0.10.3, 0.12.2, 0.11.2, 0.10.0.3 across affected packages: uri.
What version fixes CVE-2023-36617?
Upgrading to 0.10.3, 0.12.2, 0.11.2, 0.10.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is uri affected?
Yes, uri is affected in releases prior to 0.10.3, 0.12.2, 0.11.2, 0.10.0.3. Upgrade your dependency to 0.10.3, 0.12.2, 0.11.2, 0.10.0.3 or later.
What is the CVSS score of CVE-2023-36617?
CVE-2023-36617 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2023-36617?
CVE-2023-36617 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check RubyGems dependencies for CVE-2023-36617?
Run the dependency tree command: 'inspect dependencies for uri'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hww2-5g85-429m",
  "modified" : "2025-11-04T19:39:08Z",
  "published" : "2023-06-29T15:30:34Z",
  "aliases" : [ "CVE-2023-36617" ],
  "summary" : "URI gem has ReDoS vulnerability",
  "details" : "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`.\n\nNOTE: this issue exists becuse of an incomplete fix for CVE-2023-28755. Version 0.10.3 is also a fixed version.\n\n[The Ruby advisory recommends](https://www.ruby-lang.org/en/news/2023/06/29/redos-in-uri-CVE-2023-36617/) updating the uri gem to 0.12.2. In order to ensure compatibility with the bundled version in older Ruby series, you may update as follows instead:\n- For Ruby 3.0: Update to uri 0.10.3\n- For Ruby 3.1 and 3.2: Update to uri 0.12.2.\n\nYou can use gem update uri to update it. If you are using bundler, please add gem `uri`, `>= 0.12.2` (or other version mentioned above) to your Gemfile.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "uri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.1"
      }, {
        "fixed" : "0.10.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "uri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.12.0"
      }, {
        "fixed" : "0.12.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "uri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.11.0"
      }, {
        "fixed" : "0.11.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "uri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36617"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/05b1e7d026b886e65a60ee35625229da9ec220bb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/38bf797c488bcb4a37fb322bfa84977981863ec6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/3cd938df20db26c9439e9f681aadfb9bbeb6d1c0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/4d02315181d8a485496f1bb107a6ab51d6f3a35f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/70794abc162bb15bb934713b5669713d6700d35c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/7e33934c91b7f8f3ea7b7a4258b468e19f636bc3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/9a8e0cc03da964054c2a4ea26b59c53c3bae4921"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/uri/commit/ba36c8a3ecad8c16dd3e60a6da9abd768206c8fa"
  }, {
    "type" : "WEB",
    "url" : "https://www.ruby-lang.org/en/news/2023/06/29/redos-in-uri-CVE-2023-36617"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230725-0002"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QA6XUKUY7B5OLNQBLHOT43UW7C5NIOQQ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/27LUWREIFTP3MQAW7QE4PJM4DPAQJWXF"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2024/09/msg00000.html"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/uri/CVE-2023-36617.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ruby/uri"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-14T21:52:02Z",
    "nvd_published_at" : "2023-06-29T13:15:09Z"
  }
}