CVE-2026-49264

OAuthLib: Unsafe JSONP callback injection in RevocationEndpoint allows arbitrary JavaScript response generation

Published Oct 13, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. From 0.6.1 until 4.0.0, OAuthLib's RevocationEndpoint in oauthlib/oauth2/rfc6749/endpoints/revocation.py reflects an unvalidated callback request parameter into success and error response bodies when enable_jsonp=True. The callback can come from the query string or request body and is used without restricting it to a legal JavaScript function name. A browser application that loads the revocation response as trusted JSONP and permits attacker influence over callback can therefore execute attacker-controlled JavaScript in the including application's origin, with access to its DOM and script-accessible data. The feature is disabled by default, so only deployments that explicitly enable JSONP are affected. This issue is fixed in version 4.0.0.

Analysis

AI-generated

Technical impact

OAuthLib’s RevocationEndpoint reflected an unvalidated callback parameter into JSONP responses when enable_jsonp was enabled. The callback was not checked to be a legal JavaScript function name, allowing an attacker to supply arbitrary code that would be executed in the victim’s browser context. The executed code can read or modify the DOM, access cookies and other script‑accessible data, and potentially perform further actions as the user.

Affected Systems

The flaw exists in OAuthLib versions 0.6.1 through 3.x, inclusive, and is mitigated in v4.0.0. Only deployments that explicitly enable JSONP via the enable_jsonp flag in the RevocationEndpoint are vulnerable. The library is used in Python 3.6+ environments for OAuth2 request signing.

Risk and Exploitability

The CVSS score of 6.1 classifies the vulnerability as medium severity. It is not catalogued in the CISA KEV database. The endpoint is reachable over the network, so the attack vector is remote. An attacker who can influence the callback parameter in a revocation request that is processed as trusted JSONP can inject and execute arbitrary JavaScript within the origin of the including application.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update OAuthLib to version 4.0.0 or later, where the JSONP feature is removed.
  • Disable the enable_jsonp option in all affected deployments, preventing JSONP responses from being generated.
  • If the application must use JSONP for compatibility, restrict the callback parameter to a safe whitelist of approved JavaScript function names.

Generated by OpenCVE AI on October 13, 2026 at 19:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-hj66-6f7g-4r5v Oauthlib : Unsafe JSONP callback injection in RevocationEndpoint allows arbitrary JavaScript response generation
History
Type Values Removed Values Added
First Time appeared Oauthlib
Oauthlib oauthlib
Vendors & Products Oauthlib
Oauthlib oauthlib
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. From 0.6.1 until 4.0.0, OAuthLib's RevocationEndpoint in oauthlib/oauth2/rfc6749/endpoints/revocation.py reflects an unvalidated callback request parameter into success and error response bodies when enable_jsonp=True. The callback can come from the query string or request body and is used without restricting it to a legal JavaScript function name. A browser application that loads the revocation response as trusted JSONP and permits attacker influence over callback can therefore execute attacker-controlled JavaScript in the including application's origin, with access to its DOM and script-accessible data. The feature is disabled by default, so only deployments that explicitly enable JSONP are affected. This issue is fixed in version 4.0.0.
Title OAuthLib: Unsafe JSONP callback injection in RevocationEndpoint allows arbitrary JavaScript response generation
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 16, 2026, 10:04 PM
Reserved
May 28, 2026, 2:33 PM
Status
Deferred
Published
Oct 13, 2026, 4:17 PM
Modified
Oct 16, 2026, 11:17 PM