MediumGHSA-7v5v-9h63-cj86CVE-2024-37168

@grpc/grpc-js can allocate memory for incoming messages well above configured limits

Published 10 Jun 2024 · Updated 10 Sept 2026

Affected packages

Affected
>=1.10.0 <1.10.9
Fixed in
1.10.9
Update to the fixed version for your release line, for example:npm install @grpc/grpc-js@1.10.9
Affected
>=1.9.0 <1.9.15
Fixed in
1.9.15
Update to the fixed version for your release line, for example:npm install @grpc/grpc-js@1.9.15
Affected
<1.8.22
Fixed in
1.8.22
Update to the fixed version for your release line, for example:npm install @grpc/grpc-js@1.8.22

Details

Impact

There are two separate code paths in which memory can be allocated per message in excess of the grpc.max_receive_message_length channel option:

1. If an incoming message has a size on the wire greater than the configured limit, the entire message is buffered before it is discarded. 2. If an incoming message has a size within the limit on the wire but decompresses to a size greater than the limit, the entire message is decompressed into memory, and on the server is not discarded.

Patches

This has been patched in versions 1.10.9, 1.9.15, and 1.8.22

Is GHSA-7v5v-9h63-cj86 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected @grpc/grpc-js, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.