Sep 24, 2026·7 min read·4 visits
Applications using the vk-app authentication backend in social-auth-core < 5.0.0 fail to verify signatures if the auth_key parameter is completely omitted, allowing full account bypass via spoofed VKontakte user IDs.
An authentication bypass vulnerability exists in the VKontakte App backend of social-auth-core prior to version 5.0.0. The vulnerability allows remote attackers to bypass cryptographic signature verification and gain unauthorized access to arbitrary accounts by omitting the signature parameter.
The Python Social Auth framework, distributed on PyPI as social-auth-core, is a widely adopted library designed to facilitate third-party authentication integrations across multiple web frameworks. Among its supported OAuth and platform-specific backends, the library provides a backend named VKAppOAuth2 (implemented in the module social_core.backends.vk). This specific backend is engineered to handle authentication for applications running within the VKontakte (VK) platform iframe and mini-app environment. The core vulnerability is an improper authentication mechanism, classified under CWE-287 and CWE-347, which permits total authentication bypass when integrating applications utilize this specific backend configuration.
The vulnerability specifically resides in how incoming callback parameters are processed and validated. To integrate with the VK application model, the backend accepts user identity credentials via a URL callback mechanism. In secure setups, these callbacks are signed by the VK platform using a shared client secret to guarantee integrity. However, the VKAppOAuth2 backend implementation failed to enforce the mandatory presence of the signature parameter. Consequently, an unauthenticated remote attacker can manipulate the authentication flow by completely omitting the cryptographic signature, leading directly to unauthorized access to arbitrary accounts.
To understand the root cause of this vulnerability, it is necessary to examine the VKontakte platform's authentication architecture. When a user interacts with a VK mini-app, the platform constructs an authentication payload containing variables such as viewer_id, access_token, and api_id. To allow the receiving application to verify the legitimacy of these values, the platform signs the request by generating an MD5 hash of a combined string containing the application ID, the user's viewer ID, and the application's client secret. This computed signature is passed to the application backend within the auth_key query parameter.
The flaw in the library's VKAppOAuth2 module is located in the conditional logic of the auth_complete method, which is responsible for validating this callback. Instead of executing signature verification on every incoming request, the code checks whether the auth_key parameter is present in the request data. If the client submits a request where the auth_key parameter is entirely omitted, the call to self.data.get("auth_key") returns None. The conditional check if auth_key: then evaluates to false, causing the execution flow to skip the validation block entirely and proceed directly to user session initialization.
Because the signature validation is entirely bypassed when no signature is provided, the backend implicitly trusts the client-provided viewer_id value. This logical failure breaks the fundamental security guarantees of cryptographic signing. Instead of failing closed in the absence of a security parameter, the backend fails open, allowing any unverified identity assertion to successfully authenticate.
The vulnerable logic is clearly demonstrated in the source code of social_core/backends/vk.py prior to the release of version 5.0.0. The code snippet below illustrates how the conditional check was structured:
# Vulnerable Implementation in social_core/backends/vk.py
def auth_complete(self, *args, **kwargs):
# Retrieve the signature parameter from client data
auth_key = self.data.get("auth_key")
# The validation is wrapped in a conditional check that relies on the key's presence
key, secret = self.get_key_and_secret()
if auth_key:
# Signature is only checked if the client voluntarily provided one
check_key = vk_sig(f"{key}_{self.data.get('viewer_id')}_{secret}")
if check_key != auth_key:
raise ValueError("VK.com authentication failed: invalid auth key")
# If auth_key is None, the block above is skipped, and user_id is trusted blindly
user_check = self.setting("USERMODE")
user_id = self.data.get("viewer_id")The remediation commit (1bfacdd0379e5eb46e169a99ab648b835e9bb6a2) resolves this flaw by restructuring the control flow to mandate the presence of the auth_key parameter. Below is the patched implementation:
# Patched Implementation in social_core/backends/vk.py
def auth_complete(self, *args, **kwargs):
# Retrieve the signature parameter from client data
auth_key = self.data.get("auth_key")
# Explicitly enforce the presence of the signature
key, secret = self.get_key_and_secret()
if not auth_key:
# The application fails closed immediately if the signature is missing
raise AuthFailed(self, "Missing auth key")
# Proceed to calculate the expected signature and validate
check_key = vk_sig(f"{key}_{self.data.get('viewer_id')}_{secret}")
if check_key != auth_key:
# Standard AuthFailed exception is raised instead of ValueError
raise AuthFailed(self, "Invalid auth key")
user_check = self.setting("USERMODE")
user_id = self.data.get("viewer_id")The patch introduces complete validation coverage by separating the presence check from the verification check. By raising an AuthFailed exception immediately if auth_key is not found, the library guarantees that no request can reach the session creation phase without passing signature verification. Additionally, the transition from raising a generic ValueError to a framework-specific AuthFailed exception ensures proper error handling within the Python Social Auth middleware stack.
Exploiting this vulnerability does not require complex cryptographic attacks or memory manipulation. Because the flaw is a logical bypass, an attacker only needs network access to the application's public callback endpoint and knowledge of the target user's identifier. The primary requirement for exploitation is that the target web application must have the VKAppOAuth2 backend enabled within its authentication configuration settings.
To perform an account takeover, the attacker begins by identifying the numerical VKontakte identifier (viewer_id) of the target victim. Because VK user IDs are public or easily obtainable through standard platform interaction, this identifier represents a low barrier to acquisition. The attacker then constructs a crafted HTTP GET or POST request targeting the callback URI, typically located at /complete/vk-app/. The payload is designed to simulate a successful callback from the VK interface but intentionally omits the auth_key parameter.
The request query string is populated with the targeted viewer_id along with dummy parameters for access_token and api_id to satisfy basic input requirements. When the application processes this request, the backend detects the absence of the auth_key parameter, skips verification, and establishes an authenticated session under the target's identity. The attacker is subsequently redirected into the application, fully authenticated as the target victim.
The security impact of this vulnerability is severe, leading to full account takeover and unauthorized data access. Because authentication is bypassed entirely, an attacker can log in as any user whose VKontakte identifier is known. This allows unauthorized access to private personal data, application configurations, administrative interfaces, and any downstream services connected to the compromised user session.
The Common Vulnerability Scoring System (CVSS) v3.1 base score is established at 7.4, reflecting a high-severity rating. The vector is defined as CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N. The attack complexity is rated as high because the vulnerability is contingent on the specific application configuration utilizing the VKAppOAuth2 backend, which is less common than the standard VKOAuth2 backend. There is no availability impact associated with this flaw, as exploitation does not cause denial-of-service conditions or system instability.
While no public weaponized exploits are currently observed in the wild, the simplicity of the attack path makes it highly trivial to operationalize once a vulnerable target is identified. This raises the overall risk level for organizations running outdated deployments of Python Social Auth.
The primary mitigation path for this vulnerability is upgrading the social-auth-core package to version 5.0.0 or later. This release enforces signature verification on all requests handled by the VKAppOAuth2 backend. System administrators and developers should verify the installed package version using their dependency management tools and execute the upgrade sequence.
For deployments where an immediate package upgrade is not feasible, a highly effective workaround is to disable the vulnerable backend. Applications should inspect their configuration settings (such as SOCIAL_AUTH_AUTHENTICATION_BACKENDS in Django settings) and remove the social_core.backends.vk.VKAppOAuth2 entry. The standard VKontakte OAuth backend (social_core.backends.vk.VKOAuth2) relies on an entirely different callback validation sequence that requires server-to-server token exchange and is not affected by this logic flaw.
In addition to configuring the backend securely, developers should review custom callback implementations for similar patterns of conditional validation. A secure validation routine must always validate input presence prior to processing, failing closed by default if any expected cryptographic parameter is missing from the incoming data stream.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
social-auth-core python-social-auth | < 5.0.0 | 5.0.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-287 / CWE-347 |
| Attack Vector | Network |
| CVSS Severity | 7.4 (High) |
| Impact | Unauthenticated Account Takeover |
| Exploit Status | PoC / Conceptual |
| KEV Status | Not listed |
The application performs authentication without verifying the presence of critical parameters or validation signatures.
A Login Cross-Site Request Forgery (Login CSRF) vulnerability was discovered in the social-auth-core library prior to version 5.0.0 when utilizing the LoginRadius authentication backend. The backend explicitly disabled state token validation during the authentication callback, allowing attackers to link their identities to victim sessions.
CVE-2026-57179 is a critical Session Fixation and Login Cross-Site Request Forgery (CSRF) vulnerability in python-social-auth's core library (social-auth-core) prior to version 5.0.0. The vulnerability allows remote attackers to force arbitrary state transitions and bind third-party social credentials to a victim's session, leading to complete account takeover.
A Server-Side Request Forgery (SSRF) vulnerability exists in the Contao Open Source Content Management System (CMS) within the Feed Reader front-end module. When processing RSS feed configurations, the module initiates outbound HTTP connections using a default HTTP client that lacks loopback and private network controls. Authenticated backend users with permissions to configure frontend modules can exploit this flaw to coerce the server into sending requests to internal endpoints, loopback addresses, and cloud instance metadata services.
CVE-2026-63498 is a high-severity Stored Cross-Site Scripting (XSS) vulnerability in Snipe-IT prior to version 8.7.0. The flaw resides in the REST API's file retrieval endpoint, which allows files to be rendered inline without sanitizing or restricting malicious content types like XML and XSLT stylesheets, leading to browser-side script execution in the context of the application's origin.
CVE-2026-19730 is a local security vulnerability in the Podman container engine's Quadlet systemd generator. When updating existing configurations using 'podman quadlet install --replace' on filesystems that do not support reflink operations (such as standard ext4), the file is opened without the O_TRUNC flag. If the new configuration file is shorter than the pre-existing file, the trailing lines of the old file remain intact and are successfully parsed by systemd, leading to a failure to remove security-critical parameters like AddCapability, User, or host storage mounts.
Snipe-IT prior to version 8.7.0 is vulnerable to an authentication bypass (CVE-2026-63493 / GHSA-hxcx-9h4f-42xx) within its Laravel Passport API integration. When multi-factor authentication (MFA/2FA) is enabled, an attacker possessing a victim's password can bypass MFA controls completely. This occurs because the Laravel middleware that enforces MFA was registered only in the stateful 'web' middleware group, leaving the stateless 'api' middleware group unguarded. Consequently, an attacker can use a valid password to initiate a session, bypass the MFA prompt on the web UI by communicating directly with the API, and generate a long-lived Personal Access Token (PAT) to perform unauthorized operations.