Missing device code check in OAuthLib lets callers get bearer tokens
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- Low · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-287.
Summary
OAuthLib from 3.3.0 before 4.0.1 does not require the device_code parameter to be present and valid in DeviceCodeGrant.validate_token_request. An attacker whose client request passes the configured validator and who knows a valid client ID enabled for the device workflow can send a missing or bogus device code to the token endpoint and get a bearer token without completing device authorization. The weakness is classified as CWE-287.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| oauthlib | oauthlib | 3.3.0 to before 4.0.1 | 4.0.1 | Patch available | CNA |
| — | oauthlib (PyPI) | 3.3.0 to before 4.0.1 | 4.0.1 | Patch available | GHSA-3jp2-3mrg-2vxc |
- oauthlib Vendoroauthlib Affected 3.3.0 to before 4.0.1 Fixed in 4.0.1 Patch available CNA
- oauthlib (PyPI) Vendor— Affected 3.3.0 to before 4.0.1 Fixed in 4.0.1 Patch available GHSA-3jp2-3mrg-2vxc
Remediation
Upgrade oauthlib to version 4.0.1, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA oauthlib (oauthlib) Fixed in 4.0.1
- Fix · GHSA-3jp2-3mrg-2vxc oauthlib (PyPI) Fixed in 4.0.1 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 1 product
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-11-05 Threatist record created from CVE-2026-49272
- 2026-11-05 CISA SSVC decision points changed
- 2026-11-05 Priority changed: MEDIUM → HIGH
- 2026-11-05 Alias added: GHSA-3jp2-3mrg-2vxc
- 2026-11-05 Fix available: PyPI/[email protected] · GHSA-3jp2-3mrg-2vxc
- 2026-11-05 3 new references · GHSA-3jp2-3mrg-2vxc
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
- 2026-11-06 Affected versions changed · Red Hat
References
Other 5
More oauthlib vulnerabilities
- TI-2026-82213 OAuthLib token grants can authorize with another client's identity CVSS 4.0HIGH 8.4
- TI-2026-71760 Unsafe JSONP callback injection in OAuthLib RevocationEndpoint CVSS 3.1MEDIUM 6.1
- TI-2026-71761 Timing side channel in OAuthLib PKCE code_verifier comparison CVSS 3.1MEDIUM 6.8
Sources
- CVE-2026-49272 · CVE Program
- CVE-2026-49272 · NVD
- FIRST EPSS
- GHSA-3jp2-3mrg-2vxc · GitHub Advisory Database · CC BY 4.0
- CVE-2026-49272 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences