OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
CVE-2026-49272
Summary A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:devicecode" and a bogus devicecode is able to get a bearer token as long as they know a valid client ID enabled for the device workflow. Details [Section 3.4 of the RFC 8628 spec](https://datatracker.ietf.org/doc/html/rfc8628#section-3.4) says that the token endpoint should take in devicecode as a required parameter.DeviceCodeGrant.validatetokenrequest does not perform any validation of devicecode. DeviceCodeGrant.validatetokenrequest should be validating that devicecode was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validatetokenrequest does the checks [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/granttypes/authorizationcode.py#L446) and [here](https://github.com/oauthlib/oauthlib/blob/a015b446622f2b925517501fe484c10eff7a83c0/oauthlib/oauth2/rfc6749/granttypes/authorizationcode.py#L483). I would like to propose a new method be added to RequestValidator called validatedevicecode that is similar to the validatecode method and is called inside of DeviceCodeGrant.validatetokenrequest.…
Assessment
- CVSS
- 8.5 (v3.1)
- Severity
- High
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 27 October 2026
- Last updated
- 27 October 2026
- Affected
- pip · oauthlib
- Weakness
- CWE-287
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N
At the source
References
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-49272