Описание
etcd: Watch API authorization bypass via open-ended range requests
Impact
What kind of vulnerability is it? Who is impacted?
A user granted READ permission on a single, exact key can use the Watch gRPC API with clientv3.WithFromKey() (an open-ended, "from this key to the end of the keyspace" watch) to receive watch events for every key lexicographically greater than or equal to their permitted key — not just the one key they were granted.
This is an authorization bypass in etcd's RBAC enforcement for the Watch API; Range/Get and DeleteRange requests are not affected. It only affects clusters with authentication enabled — clusters running without auth already allow unrestricted read access.
Patches
Has the problem been patched? What versions should users upgrade to?
This vulnerability is patched in the following versions:
- etcd 3.7.1
- etcd 3.6.14
- etcd 3.5.33
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
If upgrading is not immediately possible, the following mitigations reduce exposure:
- Audit READ grants. Any READ grant — even on one key — can be leveraged via Watch to read everything after it. Review who holds READ permissions and revoke/tighten any you wouldn't trust with full read access.
- Restrict network access. Limit which hosts can reach etcd's client (gRPC) port via firewall rules or network policy, reducing who can attempt exploitation.
Reporter
- Luis Toro (@lobuhi on Github)
- Anthropic and Adam Korczynski (@AdamKorcz on Github)
Ссылки
- https://github.com/etcd-io/etcd/security/advisories/GHSA-xg4h-6gfc-h4m8
- https://github.com/etcd-io/etcd/commit/6643f80602461a6095c9b294b6512fd9719bef41
- https://github.com/etcd-io/etcd/commit/afeaa624da19085b47fb5ccc7c22a8c421bc2eae
- https://github.com/etcd-io/etcd/commit/e863b001bbf3367003a543aa3099db9892134cd7
- https://github.com/etcd-io/etcd/releases/tag/v3.5.33
- https://github.com/etcd-io/etcd/releases/tag/v3.6.14
- https://github.com/etcd-io/etcd/releases/tag/v3.7.1
Пакеты
go.etcd.io/etcd/v3
>= 3.7.0-alpha.0, < 3.7.1
3.7.1
go.etcd.io/etcd/v3
>= 3.6.0, < 3.6.14
3.6.14
go.etcd.io/etcd/v3
< 3.5.33
3.5.33
Связанные уязвимости
etcd is a distributed key-value store for the data of a distributed system. Prior to versions 3.5.33, 3.6.14, and 3.7.1, a user granted READ permission on a single exact key can use the Watch gRPC API with clientv3.WithFromKey() to receive watch events for every key lexicographically greater than or equal to the permitted key. In server/etcdserver/api/v3rpc/watch.go, the open-ended RangeEnd sentinel is rewritten before the RBAC permission check in server/auth/range_perm_cache.go function isRangeOpPermitted, causing the request to be treated as an exact-key watch. Range/Get and DeleteRange requests are not affected, and the issue affects only clusters with authentication enabled. This issue is fixed in versions 3.5.33, 3.6.14, and 3.7.1.
etcd is a distributed key-value store for the data of a distributed system. Prior to versions 3.5.33, 3.6.14, and 3.7.1, a user granted READ permission on a single exact key can use the Watch gRPC API with clientv3.WithFromKey() to receive watch events for every key lexicographically greater than or equal to the permitted key. In server/etcdserver/api/v3rpc/watch.go, the open-ended RangeEnd sentinel is rewritten before the RBAC permission check in server/auth/range_perm_cache.go function isRangeOpPermitted, causing the request to be treated as an exact-key watch. Range/Get and DeleteRange requests are not affected, and the issue affects only clusters with authentication enabled. This issue is fixed in versions 3.5.33, 3.6.14, and 3.7.1.
etcd is a distributed key-value store for the data of a distributed sy ...