GHSA-7v5v-9h63-cj86

Suggest an improvement
Source
https://github.com/advisories/GHSA-7v5v-9h63-cj86
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-7v5v-9h63-cj86/GHSA-7v5v-9h63-cj86.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-7v5v-9h63-cj86
Aliases
Related
Published
2024-06-10T21:38:05Z
Modified
2024-07-15T22:42:21.836637Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
@grpc/grpc-js can allocate memory for incoming messages well above configured limits
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

Database specific
{
    "github_reviewed_at": "2024-06-10T21:38:05Z",
    "severity": "MODERATE",
    "nvd_published_at": "2024-06-10T22:15:12Z",
    "cwe_ids": [
        "CWE-789"
    ],
    "github_reviewed": true
}
References

Affected packages

npm / @grpc/grpc-js

Package

Name
@grpc/grpc-js
View open source insights on deps.dev
Purl
pkg:npm/%40grpc/grpc-js

Affected ranges

Type
SEMVER
Events
Introduced
1.10.0
Fixed
1.10.9

npm / @grpc/grpc-js

Package

Name
@grpc/grpc-js
View open source insights on deps.dev
Purl
pkg:npm/%40grpc/grpc-js

Affected ranges

Type
SEMVER
Events
Introduced
1.9.0
Fixed
1.9.15

npm / @grpc/grpc-js

Package

Name
@grpc/grpc-js
View open source insights on deps.dev
Purl
pkg:npm/%40grpc/grpc-js

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.22