CVE-2023-22799: Globalid Denial of Service Vulnerability

LOW
Advisory Identifier: GHSA-23c2-gwp5-pxw9
CWE-1333
Published
Advisory Summary

CVE-2023-22799 is a LOW denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Globalid libraries in the RubyGems ecosystem. The issue involves redos based dos vulnerability in globalid. Remediation is available by upgrading affected packages to version 1.0.1.

CVE-2023-22799 at a Glance

CVE Identifier CVE-2023-22799
GHSA Identifier GHSA-23c2-gwp5-pxw9
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Globalid
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2023-22799

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

globalid fixed: 1.0.1
Upgrade globalid to 1.0.1
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 globalid

How to Check if You Are Affected

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

inspect dependencies for globalid

Analyze the terminal output to locate any version of Globalid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), 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 Globalid, 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

There is a ReDoS based DoS vulnerability in the GlobalID gem. This vulnerability has been assigned the CVE identifier CVE-2023-22799. Versions Affected: >= 0.2.1 Not affected: NOTAFFECTED Fixed Versions: 1.0.1 Impact There is a possible DoS vulnerability in the model name parsing section of the GlobalID gem. Carefully crafted input can cause the regular expression engine to take an unexpected amount of time. All users running an affected release should either upgrade or use one of the workarounds immediately. Releases The FIXED releases are available at the normal locations. Workarounds There are no feasible workarounds for this issue. Patches To aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset. 1-0-model-name-redos.patch - Patch for 1.0 series

CVE-2023-22799 Affected Globalid Versions

1 component(s)
Fixed Versions:
1.0.1
Product / Package Ecosystem Affected Versions Fixed Version
globalid
RubyGems
≥ 0.2.1
< 1.0.1
1.0.1

References

Frequently Asked Questions

What is CVE-2023-22799?
CVE-2023-22799 is a security vulnerability in Globalid involving ReDoS based DoS vulnerability in GlobalID under CWE-1333: Inefficient Regular Expression Complexity.
Which Globalid versions are affected?
Affected versions include releases prior to 1.0.1 across affected packages: globalid.
What version fixes CVE-2023-22799?
Upgrading to 1.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is globalid affected?
Yes, globalid is affected in releases prior to 1.0.1. Upgrade your dependency to 1.0.1 or later.
What CWE is associated with CVE-2023-22799?
CVE-2023-22799 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-22799?
Run the dependency tree command: 'inspect dependencies for globalid'. 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-23c2-gwp5-pxw9",
  "modified" : "2023-09-18T20:31:36Z",
  "published" : "2023-01-18T18:13:19Z",
  "aliases" : [ "CVE-2023-22799" ],
  "summary" : "ReDoS based DoS vulnerability in GlobalID",
  "details" : "There is a ReDoS based DoS vulnerability in the GlobalID gem. This vulnerability has been assigned the CVE identifier CVE-2023-22799.\n\nVersions Affected: >= 0.2.1 Not affected: NOTAFFECTED Fixed Versions: 1.0.1\nImpact\n\nThere is a possible DoS vulnerability in the model name parsing section of the GlobalID gem. Carefully crafted input can cause the regular expression engine to take an unexpected amount of time. All users running an affected release should either upgrade or use one of the workarounds immediately.\nReleases\n\nThe FIXED releases are available at the normal locations.\nWorkarounds\n\nThere are no feasible workarounds for this issue.\nPatches\n\nTo aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.\n\n    1-0-model-name-redos.patch - Patch for 1.0 series\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "globalid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.1"
      }, {
        "fixed" : "1.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22799"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/globalid/commit/4a75ecbfd73a8e92e32a1723b81a17e3136bd8fc"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.rubyonrails.org/t/cve-2023-22799-possible-redos-based-dos-vulnerability-in-globalid/82127"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rails/globalid"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/globalid/releases/tag/v1.0.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/globalid/CVE-2023-22799.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-18T18:13:19Z",
    "nvd_published_at" : "2023-02-09T20:15:00Z"
  }
}