OAuthLibでデバイスコードの検証不備により認証を回避される脆弱性
Summary
OAuthLibのデバイスフローで、有効なクライアントIDさえ分かれば、不正なdevice_codeでもトークンエンドポイントからベアラートークンを取得できる脆弱性です。影響を受けるのは3.3.0以上4.0.0未満のPyPI版と4.0.0以下のpip版で、修正版はPyPIが4.0.0、pipが4.0.1です。修正版への更新をお勧めします。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
OAuthLibのデバイスフローで、有効なクライアントIDさえ分かれば、不正なdevice_codeでもトークンエンドポイントからベアラートークンを取得できる脆弱性です。影響を受けるのは3.3.0以上4.0.0未満のPyPI版と4.0.0以下のpip版で、修正版はPyPIが4.0.0、pipが4.0.1です。修正版への更新をお勧めします。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| pipoauthlib |
< 4.0.1→ 4.0.1 |
4.0.1 |
| PyPIoauthlib |
≥ 3.3.0, < 4.0.1→ 4.0.1 |
4.0.1 |
| oauthliboauthlib | — | Not listed |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-49272 python-oauthlib No fixed version in this record
- Ubuntu UBUNTU-CVE-2026-49272 python-oauthlib Fix available
Original description The description as published by the source.
OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. From 3.3.0 until 4.0.1, OAuthLib's RFC 8628 device workflow does not require DeviceCodeGrant.validate_token_request to check that the device_code parameter is present and valid. A caller whose client request is accepted by the configured validator and who knows a valid client ID enabled for the device workflow can submit a missing or bogus device code to the token endpoint and obtain a bearer token without completing device authorization. This issue is fixed in version 4.0.1.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- REDHAT Red Hat
- web github.com
- web github.com
- web github.com