Vulnerabilities in pkg:gem/grpc

PACKAGE
Advisory Identifier: GHSA-p25m-jpj4-qcrr
Advisory Summary

CVE-2023-4785 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-248: Uncaught Exception) affecting Grpc libraries in the RubyGems ecosystem. The issue involves denial of service vulnerability in grpc tcp server (posix-compatible platforms). Remediation is available by upgrading affected packages to version 1.56.2, 1.55.3, 1.54.3, 1.53.2.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/grpc

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/grpc. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-p25m-jpj4-qcrr CVE-2023-4785 HIGH Denial of Service Vulnerability in gRPC TCP Server (Posix-compatible platforms)
GHSA-6628-q6j9-w8vg CVE-2023-1428 HIGH gRPC Reachable Assertion issue
GHSA-9hxf-ppjv-w6rq CVE-2023-32732 MODERATE gRPC connection termination issue
GHSA-cfgp-2977-2fmm CVE-2023-32731 HIGH Connection confusion in gRPC
GHSA-496j-2rq6-j6cc CVE-2023-33953 HIGH Excessive Iteration in gRPC

CVE-2023-4785 at a Glance

CVE Identifier CVE-2023-4785
GHSA Identifier GHSA-p25m-jpj4-qcrr
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-248: Uncaught Exception
Affected Product Grpc
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:H).

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 High (A:H)

How to Fix CVE-2023-4785

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

grpc fixed: 1.56.2
Upgrade grpc to 1.56.2
grpc fixed: 1.55.3
Upgrade grpc to 1.55.3
grpc fixed: 1.54.3
Upgrade grpc to 1.54.3
grpc fixed: 1.53.2
Upgrade grpc to 1.53.2
grpcio fixed: 1.55.3
pip install grpcio>=1.55.3
grpcio fixed: 1.54.3
pip install grpcio>=1.54.3
grpcio fixed: 1.53.2
pip install grpcio>=1.53.2
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 grpc

How to Check if You Are Affected

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

inspect dependencies for grpc

Analyze the terminal output to locate any version of Grpc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.56.2), 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-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Grpc, 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

Lack of error handling in the TCP server in Google's gRPC starting version 1.23 on posix-compatible platforms (ex. Linux) allows an attacker to cause a denial of service by initiating a significant number of connections with the server. Note that gRPC C++ Python, and Ruby are affected, but gRPC Java, and Go are NOT affected. 

CVE-2023-4785 Affected Grpc Versions

7 component(s)
Fixed Versions:
1.56.21.55.31.54.31.53.2
Product / Package Ecosystem Affected Versions Fixed Version
grpc
RubyGems
≥ 1.56.0
< 1.56.2
1.56.2
grpc
RubyGems
≥ 1.55.0
< 1.55.3
1.55.3
grpc
RubyGems
≥ 1.54.0
< 1.54.3
1.54.3
grpc
RubyGems
≥ 1.53.0
< 1.53.2
1.53.2
grpcio
PyPI
≥ 1.55.0
< 1.55.3
1.55.3
grpcio
PyPI
≥ 1.54.0
< 1.54.3
1.54.3
grpcio
PyPI
≥ 1.53.0
< 1.53.2
1.53.2

References

Frequently Asked Questions

What is CVE-2023-4785?
CVE-2023-4785 is a security vulnerability in Grpc involving Denial of Service Vulnerability in gRPC TCP Server (Posix-compatible platforms) under CWE-248: Uncaught Exception.
Which Grpc versions are affected?
Affected versions include releases prior to 1.56.2, 1.55.3, 1.54.3, 1.53.2 across affected packages: grpc, grpcio.
What version fixes CVE-2023-4785?
Upgrading to 1.56.2, 1.55.3, 1.54.3, 1.53.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is grpc affected?
Yes, grpc is affected in releases prior to 1.56.2, 1.55.3, 1.54.3, 1.53.2. Upgrade your dependency to 1.56.2, 1.55.3, 1.54.3, 1.53.2 or later.
Is grpcio affected?
Yes, grpcio is affected in releases prior to 1.55.3, 1.54.3, 1.53.2. Upgrade your dependency to 1.55.3, 1.54.3, 1.53.2 or later.
What is the CVSS score of CVE-2023-4785?
CVE-2023-4785 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-4785?
CVE-2023-4785 is classified under CWE-248: Uncaught Exception (An exception is thrown from a function, but it is not caught.).
How can I check RubyGems dependencies for CVE-2023-4785?
Run the dependency tree command: 'inspect dependencies for grpc'. 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-p25m-jpj4-qcrr",
  "modified" : "2026-01-12T19:17:00Z",
  "published" : "2023-09-13T18:31:26Z",
  "aliases" : [ "CVE-2023-4785" ],
  "summary" : "Denial of Service Vulnerability in gRPC TCP Server (Posix-compatible platforms)",
  "details" : "Lack of error handling in the TCP server in Google's gRPC starting version 1.23 on posix-compatible platforms (ex. Linux) allows an attacker to cause a denial of service by initiating a significant number of connections with the server. Note that gRPC C++ Python, and Ruby are affected, but gRPC Java, and Go are NOT affected. ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "grpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.56.0"
      }, {
        "fixed" : "1.56.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "grpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.55.0"
      }, {
        "fixed" : "1.55.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "grpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.54.0"
      }, {
        "fixed" : "1.54.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "grpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.53.0"
      }, {
        "fixed" : "1.53.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "grpcio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.55.0"
      }, {
        "fixed" : "1.55.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "grpcio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.54.0"
      }, {
        "fixed" : "1.54.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "grpcio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.53.0"
      }, {
        "fixed" : "1.53.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-4785"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grpc/grpc/pull/33656"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grpc/grpc/pull/33667"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grpc/grpc/pull/33669"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grpc/grpc/pull/33670"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grpc/grpc/pull/33672"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/grpc/CVE-2023-4785.yml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/grpc-io/c/LlLkB1CeE4U"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/grpc/versions/1.53.2"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/grpc/versions/1.54.3"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/grpc/versions/1.55.3"
  }, {
    "type" : "WEB",
    "url" : "https://rubygems.org/gems/grpc/versions/1.56.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-248" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-02T20:42:27Z",
    "nvd_published_at" : "2023-09-13T17:15:10Z"
  }
}