PyPI
CVE-2026-49272
OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflow
- Severity
- High 8.5
- Published
- 27 Oct 2026
- Last changed
- 5 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 4.0.1
- Exploit chance
- 0.4% in the next 30 daysHigher than 30% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Read some data · Change data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N- Also known as
- GHSA-3jp2-3mrg-2vxc
- Sources
- OSV.dev and GitHub
Description
A call to the token endpoint with a grant type of "urn:ietf:params:oauth:grant-type:device_code" and a bogus device_code is able to get a bearer token as long as they know a valid client ID enabled for the device workflow.
Section 3.4 of the RFC 8628 spec says that the token endpoint should take in device_code as a required parameter.DeviceCodeGrant.validate_token_request does not perform any validation of device_code. DeviceCodeGrant.validate_token_request should be validating that device_code was passed in as a parameter and that it is valid, similar to how AuthorizationCodeGrant.validate_token_request does the checks here and here.
I would like to propose a new method be added to RequestValidator called validate_device_code that is similar to the validate_code method and is called inside of DeviceCodeGrant.validate_token_request.
Anyone using the RFC 8628 device workflow in oauthlib that doesn't realize the device_code parameter is not being validated.
Affected software
| Software | Affected versions |
|---|---|
oauthlibPyPI · osv:PyPI:oauthlib |
|
About oauthlib
- Weekly downloads (PyPI)
- 62,846,170PyPI Stats, 23 Nov 2026
Vulnerabilities in oauthlib
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-118669OAuthLib: Token grants can use attacker-supplied client_id for authorization after authenticating a different clientHigh 30 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-49272
- GitHub Advisory Database https://github.com/advisories/GHSA-3jp2-3mrg-2vxc