Intel

AIKIDO-2026-262374

grpcio is vulnerable to Use After Free

Use After Free Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 5 days ago

65

Medium Risk

This Affects:

PYTHONgrpcio
1.81.0 - 1.81.0
Fixed in 1.81.1
Are you affected? Scan for Free

TL;DR

The gRPC Core xDS client keeps a global map from client keys to GrpcXdsClient instances. When an entry's refcount reaches zero and GetOrCreate() replaces the client, insert_or_assign() could update the map value without refreshing the absl::string_view key that still pointed into the freed object. Subsequent lookups then use a dangling key and can trigger a use-after-free crash. The fix erases zero-refcount entries before emplacing a new client and adds regression tests for the map key lifetime.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your deployment uses gRPC xDS (for example xDS resolver targets or xDS bootstrap configuration).

Background info

grpcio is vulnerable to Use After Free in versions 1.81.0 - 1.81.0.

How to fix this

Upgrade the grpcio library to the patch version.