VAITP Dataset

← Back to the dataset

CVE-2026-57178

vk-app backend trusts unsigned VK callback data when auth_key missing.

  • CVSS 7.4
  • CWE-287
  • Authentication, Authorization, and Session Management
  • Remote

Python Social Auth is a social authentication/registration mechanism. Prior to version 5.0.0, the `vk-app` backend accepted VK application callback data without verifying the callback signature when the `auth_key` parameter was omitted. Applications using this backend could treat unsigned attacker-controlled data as a verified VK identity. An attacker could choose callback fields such as `viewer_id`, `access_token`, `api_id`, and `api_result`, potentially allowing authentication as an arbitrary VK user ID. The issue affects only applications using the `vk-app` backend. The issue has been fixed in version 5.0.0 by requiring `auth_key` to be present and valid before callback data is trusted.

CVSS base score
7.4
Published
2026-09-24
OWASP
A07 Identification and Authentication Failures
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Authentication, Authorization, and Session Management
Subcategory
Insecure Authentication Mechanisms
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
Python Social Auth
Fixed by upgrading
Yes

Solution

Upgrade Python Social Auth to version 5.0.0 or later.

Vulnerable code sample

import json
from urllib.parse import parse_qs

def handle_vk_app_callback(request_body: bytes):
    # Parse query string from POST body
    params = parse_qs(request_body.decode())
    # VULNERABLE: trusts callback data without auth_key verification
    user_id = params.get('viewer_id', [None])[0]
    access_token = params.get('access_token', [None])[0]
    # Use the supplied data to create or retrieve a user
    user = get_or_create_user(vk_id=user_id, token=access_token)
    return user

Patched code sample

import json
from urllib.parse import parse_qs

def handle_vk_app_callback(request_body: bytes):
    params = parse_qs(request_body.decode())
    # FIX: require and validate auth_key before trusting data
    auth_key = params.get('auth_key', [None])[0]
    if not auth_key or not verify_vk_signature(auth_key, params):
        raise ValueError("Invalid or missing auth_key")
    user_id = params.get('viewer_id', [None])[0]
    access_token = params.get('access_token', [None])[0]
    user = get_or_create_user(vk_id=user_id, token=access_token)
    return user

def verify_vk_signature(auth_key: str, params: dict) -> bool:
    # Placeholder for real signature verification logic
    return True

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve202657178,
  title        = {{vk-app backend trusts unsigned VK callback data when auth_key missing.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-57178},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-57178/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.