Update oauthlib requirement from >=4.0.0 to >=4.0.1 #2769
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.75) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #2769"
general
weight: 0.35
roycaihw
Updates the requirements on oauthlib to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/oauthlib/oauthlib/releases">oauthlib's releases</a>.</em></p>
<blockquote>
<h2>4.0.1</h2>
<h2>Security</h2>
<ul>
<li><strong>CVE-2026-49272</strong> / GHSA-3jp2-3mrg-2vxc: The device code flow token endpoint did not validate the <code>device_code</code> parameter. A request with a known <code>client_id</code> and a bogus <code>device_code</code> could obtain a bearer token. <code>DeviceCodeGrant.validate_token_request</code> now calls <code>DeviceCodeGrant.validate_device_code()</code>, which rejects missing or unknown device codes (<code>invalid_request</code> / <code>invalid_grant</code>) and delegates the code's authorization status to the new <code>RequestValidator.validate_device_code()</code> hook, per RFC 8628 Section 3.5. (cherry-picked from <a href="https://redirect.github.com/oauthlib/oauthlib/issues/954">#954</a>)</li>
</ul>
<h2>Upgrade note for device flow integrators</h2>
<p>Custom <code>RequestValidator</code> implementations using the device flow must now implement <code>validate_device_code(client_id, code, request)</code>. Return one of the <code>DeviceCodeGrant.DEVICE_CODE_</code> statuses for known codes, or <code>None</code> for an unknown code. When returning <code>AUTHORIZED</code>, the validator must also populate <code>request.user</code> and <code>request.scopes</code> from the stored authorization.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/oauthlib/oauthlib/blob/v4.0.1/CHANGELOG.rst">oauthlib's changelog</a>.</em></p>
<blockquote>
<h2>4.0.1 (2026-11-04):</h2>
<p>OAuth2.0 Provider (Security):</p>
<ul>
<li>
<p><strong>Security</strong>: CVE-2026-49272 / GHSA-3jp2-3mrg-2vxc: The device code flow
token endpoint did not validate the <code>device_code</code> parameter. A request
with a known <code>client_id</code> and a bogus <code>device_code</code> could obtain a
bearer token. <code>DeviceCodeGrant.validate_token_request</code> now calls a new
<code>DeviceCodeGrant.validate_device_code()</code> which rejects missing or
unknown device codes (<code>400 invalid_request</code> / <code>400 invalid_grant</code>)
and delegates the code's authorization status to a new required
<code>RequestValidator.validate_device_code()</code> hook, per RFC 8628
Section 3.5. (cherry-picked from <a href="https://redirect.github.com/oauthlib/oauthlib/issues/954">#954</a>, merged as 1c91d64)</p>
<p><strong>Upgrade note for device flow integrators</strong>: custom
<code>RequestValidator</code> implementations using the device flow must now
implement <code>validate_device_code(client_id, code, request)</code>. Return one
of the <code>DeviceCodeGrant.DEVICE_CODE_</code> statuses (<code>AUTHORIZED</code>,
<code>PENDING</code>, <code>SLOW_DOWN</code> or <code>EXPIRED</code>) for known codes, or <code>None</code>
for an unknown code. When returning <code>AUTHORIZED</code>, the validator must
also populate <code>request.user</code> and <code>request.scopes</code> from the stored
authorization.</p>
</li>
</ul>
<h2>4.0.0 (2026-09-28):</h2>
<p>OAuth2.0 Provider:</p>
<ul>
<li><strong>Breaking</strong>: <a href="https://redirect.github.com/oauthlib/oauthlib/issues/951">#951</a>: Removed JSONP support from token revocation endpoint.
JSONP has been superseded by CORS for cross-origin requests.
The <code>enable_jsonp</code> parameter has been removed from <code>RevocationEndpoint</code>
and the <code>callback</code> parameter has been removed from
<code>prepare_token_revocation_request</code>.</li>
<li><strong>Breaking</strong>: <a href="https://redirect.github.com/oauthlib/oauthlib/issues/919">#919</a>, <a href="https://redirect.github.com/oauthlib/oauthlib/issues/920">#920</a>: Fixed <code>DeviceCodeGrant.validate_token_request</code>
trying to authenticate public clients.
Client authentication validation has been reorganized and is now shared
across <code>AuthorizationCodeGrant</code>, <code>DeviceCodeGrant</code>, <code>RefreshTokenGrant</code>
and <code>ResourceOwnerPasswordCredentialsGrant</code>: the <code>grant_type</code> parameter
is validated before client authentication, so requests missing
<code>grant_type</code> now return <code>400 invalid_request</code> instead of
<code>401 invalid_client</code>.</li>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/963">#963</a>: Improved PKCE code comparison</li>
</ul>
<p>Misc:</p>
<ul>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/904">#904</a>: Stop installing <code>examples</code> into <code>site-packages</code>.</li>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/930">#930</a>: Add devcontainer, Add Python3.14, Python3.14t.</li>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/931">#931</a>: Fix ruff checks about unused variables.</li>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/932">#932</a>: Dropped EOL Python 3.8 from CI.</li>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/934">#934</a>: Pre-commit hooks autoupdate.</li>
<li><a href="https://redirect.github.com/oauthlib/oauthlib/issues/938">#938</a>: Fix typos discovered by typos.</li>
<li>Add OAuthLib Maintainer agent for automated issue/PR triage and release
management.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/oauthlib/oauthlib/commit/6e3aa05af92978755939a18cb4dd655ced156c1e"><code>6e3aa05</code></a> Release 4.0.1: fix CVE-2026-49272 (device_code validation in device flow)</li>
<li><a href="https://github.com/oauthlib/oauthlib/commit/77a5f1c8ce00da2b0b8c5f6e9cc129920085f114"><code>77a5f1c</code></a> Merge pull request <a href="https://redirect.github.com/oauthlib/oauthlib/issues/954">#954</a> from hekhuisk/improve-device-workflow</li>
<li>See full diff in <a href="https://github.com/oauthlib/oauthlib/compare/v4.0.0...v4.0.1">compare view</a></li>
</ul>
</details>
<br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)</details>