API 金鑰不等於角色:LiteLLM 的金鑰管理授權邊界
An API key is not a role: LiteLLM's key-management boundary
LiteLLM 的 CVE-2026-136537 涉及 key_management_endpoints 缺少授權檢查,已登入的低權限呼叫者可能使用本應受較高角色限制的功能。
An API key is not a role: LiteLLM's key-management boundary
LiteLLM sits in front of model APIs and often stores the credentials used to reach those providers. CVE-2026-136537 describes a missing authorization check in key_management_endpoints. An authenticated caller can reach functionality that should require a stronger role, potentially changing resources that are normally protected from that user.
What the flaw actually is
The reported weakness is not a missing login. Authentication is required to exploit the issue. The failure is the absence of an authorization decision after authentication. LiteLLM uses API keys for different purposes: some identify a proxy user or team, some grant access to model routes, and some are administrative. If the key-management path accepts any valid proxy key without checking the caller's role or the target object's ownership, a low-privilege key becomes more powerful than its label suggests.
The ZDI record lists a 6.5 CVSS score with network access, low privileges, no user interaction, and high integrity impact. That combination fits an insider or compromised ordinary account more closely than an anonymous internet attack. The immediate concern is key creation, modification, or exposure that changes who can call models and how much they can spend. The record does not establish that every deployment is exploitable, so the response should verify the running version and the route behavior.
Why the impact concentrates
An AI gateway holds credentials from several trust domains. A model-provider key can authorize spending and data access outside LiteLLM itself. A proxy key can map a caller to a team budget or a set of allowed models. Administrative key management may therefore let a low-privilege user create a new identity, widen a route allowlist, or obtain a key that survives the original session.
The control should be evaluated at the object level. A team member should be able to manage only keys owned by that team. A proxy administrator may manage global keys only through a separately audited route. If the application uses a shared master key, that key should never be accepted as a normal user credential or exposed to model-facing workloads.
Remediation
Upgrade to the LiteLLM release recommended by the vendor advisory and verify the deployed package hash in the running container. The vendor references release v1.104.0, but teams should confirm the supported upgrade path and the exact affected range rather than copying a version from a third-party page. Preserve the current database and exported configuration before the upgrade, and test key creation with a non-administrator role in a staging deployment.
Restrict access to management routes at the network layer while patching. Put the admin interface behind a separate identity-aware proxy or private management network, and do not expose it on the same hostname as model inference. Use distinct credentials for proxy administration, team automation, and provider access. Rotate proxy keys and provider keys if the vulnerable route may have been used by an unauthorized account.
Review audit records for key-management calls by users whose normal work does not require them. Look for new keys, changed team assignments, altered model allowlists, and calls from unexpected source networks. After patching, test that a valid non-admin key receives a denial and that the denial does not depend on hiding a button in the UI. The API route needs the same decision. Log the actor, the target key, the role checked, and the result so future authorization regressions are detectable.
References
來源:DEV Community · dev.to