CVE-2023-32731: Grpc protobuf Connection Confusion Vulnerability
HIGHCVE-2023-32731 is a HIGH (CVSS 7.4) connection confusion vulnerability (CWE-440: Expected Behavior Violation) affecting Grpc protobuf libraries in the Maven ecosystem. The issue involves connection confusion in grpc. Remediation is available by upgrading affected packages to version 1.53.1, 1.54.2.
CVE-2023-32731 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H).
How to Fix CVE-2023-32731
To remediate this vulnerability, upgrade all affected Grpc protobuf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.53.1</version>
</dependency>
pip install grpcio>=1.53.1
Upgrade grpc to 1.53.1
pip install grpcio>=1.54.2
Upgrade grpc to 1.54.2
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.54.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.grpc
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-32731, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.grpc
Analyze the terminal output to locate any version of Grpc protobuf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.53.1), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.grpc command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-440: Expected Behavior Violation, where a feature, api, or function does not perform according to its specification. In Grpc protobuf, 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
CVE-2023-32731 Affected Grpc protobuf Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.grpc:grpc-protobuf
|
Maven |
≥ 1.53.0
< 1.53.1
|
1.53.1
|
|
grpcio
|
PyPI |
≥ 1.53.0
< 1.53.1
|
1.53.1
|
|
grpc
|
RubyGems |
≥ 1.53.0
< 1.53.1
|
1.53.1
|
|
grpcio
|
PyPI |
≥ 1.54.0
< 1.54.2
|
1.54.2
|
|
grpc
|
RubyGems |
≥ 1.54.0
< 1.54.2
|
1.54.2
|
|
io.grpc:grpc-protobuf
|
Maven |
≥ 1.54.0
< 1.54.2
|
1.54.2
|
References
Frequently Asked Questions
What is CVE-2023-32731?
Which Grpc protobuf versions are affected?
What version fixes CVE-2023-32731?
Is grpc-protobuf affected?
Is grpcio affected?
What is the CVSS score of CVE-2023-32731?
What CWE is associated with CVE-2023-32731?
How can I check Maven dependencies for CVE-2023-32731?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cfgp-2977-2fmm",
"modified" : "2025-08-13T14:56:11Z",
"published" : "2023-07-05T19:12:51Z",
"aliases" : [ "CVE-2023-32731" ],
"summary" : "Connection confusion in gRPC",
"details" : "When gRPC HTTP2 stack raised a header size exceeded error, it skipped parsing the rest of the HPACK frame. This caused any HPACK table mutations to also be skipped, resulting in a desynchronization of HPACK tables between sender and receiver. If leveraged, say, between a proxy and a backend, this could lead to requests from the proxy being interpreted as containing headers from different proxy clients - leading to an information leak that can be used for privilege escalation or data exfiltration.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.grpc:grpc-protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.53.0"
}, {
"fixed" : "1.53.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "grpcio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.53.0"
}, {
"fixed" : "1.53.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "grpc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.53.0"
}, {
"fixed" : "1.53.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "grpcio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.54.0"
}, {
"fixed" : "1.54.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "grpc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.54.0"
}, {
"fixed" : "1.54.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "io.grpc:grpc-protobuf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.54.0"
}, {
"fixed" : "1.54.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-32731"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/issues/33463"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/pull/32309"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/pull/33005"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/commit/29d8beee0ac2555773b2a2dda5601c74a95d6c10"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/commit/65a2a895afaf1d2072447b9baf246374b182a946"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/releases/tag/v1.53.1"
}, {
"type" : "WEB",
"url" : "https://github.com/grpc/grpc/releases/tag/v1.54.2"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/grpc/CVE-2023-32731.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-440" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-05T20:26:48Z",
"nvd_published_at" : "2023-06-09T11:15:09Z"
}
}