Apache Storm Client unsafe deserialization in stateful bolt checkpoints
Apache Software Foundation Apache Storm Client
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software Foundation Apache Storm Client |
| No fix yet |
Original description
Description
`DefaultStateSerializer`, used to persist and restore stateful bolt checkpoints, configured Kryo with class registration disabled and an instantiation strategy that constructs objects without invoking their constructors, then deserialized whatever bytes the state store returned. A party able to write to the topology's keyspace in the state store, for example a co-tenant of a shared Redis instance or anyone with network access to it, could therefore place a serialized object graph that executes code inside the worker JVM when the state is restored.
This requires the Redis-backed state provider, which is not the default. Write access to a state-store key is a data-plane privilege; code execution in the worker JVM is not, so the two are not equivalent.
Mitigation
Upgrade to 3.1.0, where the state serializer requires registered classes.