# CVE-2023-33953: Denial-of-Service in gRPC

> Attackers can cause denial of service in gRPC servers via unbounded memory buffering and CPU consumption in the HPACK parser.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Aug 2023
- **Updated:** 27 Sep 2024
- **Also known as:** AZL-27911, AZL-34770, AZL-39394, BELL-CVE-2023-33953, DEBIAN-CVE-2023-33953, ECHO-9fe3-9f38-13ad, GHSA-496j-2rq6-j6cc, PYSEC-2026-1424, SUSE-SU-2026:0840-1, UBUNTU-CVE-2023-33953

## What is CVE-2023-33953?

CVE-2023-33953 is a high-severity denial of service vulnerability in Google gRPC, published on 9 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

gRPC contains a vulnerability that allows hpack table accounting errors could lead to unwanted disconnects between clients and servers in exceptional cases/ Three vectors were found that allow the following DOS attacks:

- Unbounded memory buffering in the HPACK parser
- Unbounded CPU consumption in the HPACK parser

The unbounded CPU consumption is down to a copy that occurred per-input-block in the parser, and because that could be unbounded due to the memory copy bug we end up with an O(n^2) parsing loop, with n selected by the client.

The unbounded memory buffering bugs:

- The header size limit check was behind the string reading code, so we needed to first buffer up to a 4 gigabyte string before rejecting it as longer than 8 or 16kb.
- HPACK varints have an encoding quirk whereby an infinite number of 0’s can be added at the start of an integer. gRPC’s hpack parser needed to read all of them before concluding a parse.
- gRPC’s metadata overflow check was performed per frame, so that the following sequence of frames could cause infinite buffering: HEADERS: containing a: 1 CONTINUATION: containing a: 2 CONTINUATION: containing a: 3 etc…

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-834 (Excessive Iteration), CWE-789 (Memory Allocation with Excessive Size Value)

## Which versions are affected by CVE-2023-33953?

17 open source packages ship an affected version, including grpcio and grpc. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `grpcio` | PyPI | All versions | 1.53.2, 1.54.3, 1.55.2, 1.56.2 |
| `grpcio` | PyPI | All versions | 1.53.2 |
| `grpcio` | PyPI | All versions | 1.53.2 |
| `grpcio` | PyPI | From 1.54.0 | 1.54.3 |
| `grpcio` | PyPI | From 1.54.0 | 1.54.3 |
| `grpcio` | PyPI | From 1.55.0 | 1.55.2 |
| `grpcio` | PyPI | From 1.55.0 | 1.55.2 |
| `grpcio` | PyPI | From 1.56.0 | 1.56.2 |
| `grpcio` | PyPI | From 1.56.0 | 1.56.2 |
| `grpc` | RubyGems | All versions | 1.53.2 |
| `grpc` | RubyGems | All versions | 1.53.2 |
| `grpc` | RubyGems | From 1.54.0 | 1.54.3 |
| `grpc` | RubyGems | From 1.54.0 | 1.54.3 |
| `grpc` | RubyGems | From 1.55.0 | 1.55.2 |
| `grpc` | RubyGems | From 1.55.0 | 1.55.2 |
| `grpc` | RubyGems | From 1.56.0 | 1.56.2 |
| `grpc` | RubyGems | From 1.56.0 | 1.56.2 |
| `grpc` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 1.25.0-150200.3.10.1 |
| `grpc` | SUSE:Linux Enterprise Server for SAP Applications 15 SP6 | All versions | 1.25.0-150200.3.10.1 |

Products: Grpc Grpc.

## How do I fix CVE-2023-33953?

Upgrade grpcio to a fixed version for your release line: 1.53.2, 1.54.3, 1.55.2 or 1.56.2.

## Is CVE-2023-33953 being exploited?

There is no known exploitation of CVE-2023-33953 in the wild and no public exploit code.

## Other vulnerabilities in Google gRPC

- [CVE-2017-9431](https://insights.sbomify.com/CVE-2017-9431/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-8359](https://insights.sbomify.com/CVE-2017-8359/): Use after free in n/a (critical 9.8)
- [CVE-2017-7860](https://insights.sbomify.com/CVE-2017-7860/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-7861](https://insights.sbomify.com/CVE-2017-7861/): Memory corruption in n/a (critical 9.8)
- [CVE-2026-33186](https://insights.sbomify.com/CVE-2026-33186/): gRPC-Go has an authorization bypass via missing leading slash in :path (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-33953 and fix it if it is affected.

What it is: CVE-2023-33953 is a high-severity denial of service vulnerability in Google gRPC, published on 9 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-33953 in the wild and no public exploit code.

Affected packages and fixed versions:
- grpcio (PyPI): affected all versions; fixed in 1.53.2, 1.54.3, 1.55.2, 1.56.2
- grpcio (PyPI): affected all versions; fixed in 1.53.2
- grpcio (PyPI): affected all versions; fixed in 1.53.2
- grpcio (PyPI): affected from 1.54.0; fixed in 1.54.3
- grpcio (PyPI): affected from 1.54.0; fixed in 1.54.3
- grpcio (PyPI): affected from 1.55.0; fixed in 1.55.2
- grpcio (PyPI): affected from 1.55.0; fixed in 1.55.2
- grpcio (PyPI): affected from 1.56.0; fixed in 1.56.2
- grpcio (PyPI): affected from 1.56.0; fixed in 1.56.2
- grpc (RubyGems): affected all versions; fixed in 1.53.2
- grpc (RubyGems): affected all versions; fixed in 1.53.2
- grpc (RubyGems): affected from 1.54.0; fixed in 1.54.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-33953/ (Markdown: https://insights.sbomify.com/CVE-2023-33953/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-33953
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-33953
- OSV: https://osv.dev/vulnerability/CVE-2023-33953

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-33953/
Summaries are generated and may contain mistakes; the official description above is the record.
