Skip to content

OAuthLib vulnerable to DoS when attacker provides malicious IPV6 URI

Moderate severity GitHub Reviewed Published Sep 9, 2022 in oauthlib/oauthlib • Updated Oct 7, 2023

Package

pip oauthlib (pip)

Affected versions

>= 3.1.1, < 3.2.2

Patched versions

3.2.2

Description

Impact

  • Attacker providing malicious redirect uri can cause DoS to oauthlib's web application.
  • Attacker can also leverage usage of uri_validate functions depending where it is used.

What kind of vulnerability is it? Who is impacted?

Oauthlib applications using OAuth2.0 provider support or use directly uri_validate function.

Patches

Has the problem been patched? What versions should users upgrade to?

Issue fixed in 3.2.2 release.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

The redirect_uri can be verified in web toolkit (i.e bottle-oauthlib, django-oauth-toolkit, ...) before oauthlib is called. A sample check if : is present to reject the request can prevent the DoS, assuming no port or IPv6 is fundamentally required.

References

Attack Vector:

PoC

is_absolute_uri("http://[:::::::::::::::::::::::::::::::::::::::]/path")

Acknowledgement

Special thanks to Sebastian Chnelik - PyUp.io

References

@JonathanHuot JonathanHuot published to oauthlib/oauthlib Sep 9, 2022
Published by the National Vulnerability Database Sep 9, 2022
Published to the GitHub Advisory Database Sep 16, 2022
Reviewed Sep 16, 2022
Last updated Oct 7, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

EPSS score

0.270%
(68th percentile)

CVE ID

CVE-2022-36087

GHSA ID

GHSA-3pgj-pg6c-r5p7

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.