CVE-2026-49264: oauthlib - Unsafe JSONP Callback Injection in RevocationEndpoint

oauthlib Updated 01 Oct 2026

Summary

01/10/2026
Yes i
Moderate
6.1

CVE-2026-49264: When enable_jsonp=True, oauthlib's RevocationEndpoint reflects the user-supplied callback parameter directly into JavaScript response bodies on both success and error paths without validating that it is a legal JSONP cal... Affects oauthlib versions >= 0.6.1, < 4.0.0. Fixed in 4.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Oauthlib is a popular Python library that implements the OAuth 1 and OAuth 2 specifications, enabling secure authorization for web applications. It provides various endpoints for token management, including the RevocationEndpoint, which allows clients to revoke access tokens. However, a significant vulnerability exists in the RevocationEndpoint when the JSONP feature is enabled, exposing applications to potential JavaScript injection attacks.

Vulnerability Detail

The vulnerability arises when the RevocationEndpoint is configured with 'enable_jsonp=True'. In this scenario, the library reflects the user-supplied 'callback' parameter directly into JavaScript response bodies without validating its legitimacy as a JSONP callback name. This lack of validation allows attackers to inject arbitrary JavaScript code into the response, which can be executed in the context of the client application. The potential ramifications include unauthorized access to sensitive data, manipulation of the client application's DOM, and execution of malicious scripts, especially in environments where the client application trusts the response from the authorization server.

How To Fix

Latest published version: 4.0.0 as of 23 Oct 2026

pip install --upgrade "oauthlib==4.0.0"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot update the package immediately, consider disabling the JSONP feature by setting 'enable_jsonp=False' in the RevocationEndpoint constructor. This will prevent the vulnerability from being exploited until a proper fix can be applied.

Conclusion

The vulnerability CVE-2026-49264 in oauthlib's RevocationEndpoint poses a significant risk due to unsafe JSONP callback injection. It is crucial to update to the patched version or disable the JSONP feature to mitigate potential attacks. Regular monitoring and vulnerability management practices, such as using tools like Vulert, can help maintain the security of your applications.

See every vulnerability recorded for oauthlib →

Share this vulnerability

FAQ

JSONP (JSON with Padding) is a technique used to overcome cross-origin restrictions in web browsers by allowing scripts to be loaded from different domains.

If your application uses oauthlib's RevocationEndpoint with JSONP enabled, an attacker could inject malicious JavaScript that executes in the context of your application, potentially compromising sensitive data.

As a temporary measure, disable the JSONP feature by setting 'enable_jsonp=False' in your RevocationEndpoint configuration.

You can use Vulert's playground at Vulert Scanner to monitor and alert for open-source vulnerabilities in your application without requiring any installation.

The CVSS score for this vulnerability is 6.1, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for oauthlib.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 4.0.0 as of 23 Oct 2026

pip install --upgrade "oauthlib==4.0.0"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback