Skip to main content

Oauthlib : Unsafe JSONP callback injection in RevocationEndpoint allows arbitrary JavaScript response generation (CVE-2026-49264)

0
Medium
Published: 09/29/2026 (09/29/2026, 17:53:41 UTC)
Source: GCVE Database
Product: oauthlib

Description

Oauthlib's RevocationEndpoint has a vulnerability when JSONP support is enabled via the enable_jsonp=True setting. The endpoint reflects the user-supplied callback parameter directly into JavaScript responses without validating that it is a safe JSONP callback name. This allows an attacker to inject arbitrary JavaScript code in the response body, leading to potential script injection in client applications that consume this endpoint as JSONP. The vulnerability affects oauthlib versions from 0.6.1 up to but not including 4.0.0. The JSONP feature is opt-in and not enabled by default. A fix is available.

CVSS v3.1

Score 6.1medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected software

PyPIghsa
oauthlib
Affected versions
>=0.6.1 <4.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 21:23:05 UTC

Technical Analysis

Oauthlib's RevocationEndpoint, when constructed with enable_jsonp=True, reflects the callback parameter from HTTP requests verbatim into JavaScript response bodies on both success and error paths without validating that the callback is a legal JavaScript function name. This lack of validation allows attackers to craft callback values that inject arbitrary JavaScript code, which executes in the context of the client application's origin when the endpoint is consumed as JSONP. The vulnerability arises because the callback parameter is used directly to wrap the response body without sanitization or whitelist checks. This affects oauthlib versions >=0.6.1 and <4.0.0. The default setting for enable_jsonp is False, so only deployments explicitly enabling JSONP are vulnerable. The issue is tracked as CVE-2026-49264 with a CVSS 3.1 score of 6.1 (medium severity).

Potential Impact

An attacker who can influence the callback parameter in requests to the RevocationEndpoint with JSONP enabled can inject arbitrary JavaScript code into the response. This code executes in the origin of the client application consuming the JSONP response, potentially leading to cross-site scripting (XSS) attacks. The vulnerability affects client-side integrations relying on JSONP for token revocation, especially in older browsers or cross-origin JavaScript clients. The authorization server effectively becomes a source of attacker-controlled JavaScript code trusted by the client application. However, the vulnerability requires that JSONP support be explicitly enabled and that the attacker can control the callback parameter.

Mitigation Recommendations

A patch is available for this vulnerability. Users should upgrade oauthlib to a fixed version that properly validates or sanitizes the callback parameter when enable_jsonp=True. Until patched, avoid enabling the JSONP revocation feature or ensure that the callback parameter is strictly validated to allow only safe JavaScript function names matching a whitelist pattern. Since enable_jsonp defaults to False, disabling JSONP support mitigates the risk. Review vendor advisories for the exact fixed versions and apply official updates promptly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-hj66-6f7g-4r5v
Osv Schema Version
1.4.0
Aliases
["CVE-2026-49264"]
Ecosystems
["PyPI"]
Database Specific Severity
MODERATE
Cvss Version
3.1

Threat ID: 6abc27d2680226ef6846f933

Added to database: 09/29/2026, 21:04:18 UTC

Last enriched: 09/29/2026, 21:23:05 UTC

Last updated: 09/30/2026, 03:12:06 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses