{"id":2419,"cve":"CVE-2026-57178","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-57178\/","cwe":"CWE-287","cwe_number":287,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/287","cvss_score":7.4,"published":"2026-09-24","owasp":"A07 Identification and Authentication Failures","odc":"Checking","cdc":"Missing Check","category":"Authentication, Authorization, and Session Management","subcategory":"Insecure Authentication Mechanisms","scope":"Remote","impact":"Unauthorized Access","summary":"vk-app backend trusts unsigned VK callback data when auth_key missing.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-57178\/","description":"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.","solution":"Upgrade Python Social Auth to version\u202f5.0.0 or later.","affected_component":"Python Social Auth","fixed_by_upgrading":true,"vulnerable_code":"import json\nfrom urllib.parse import parse_qs\n\ndef handle_vk_app_callback(request_body: bytes):\n    # Parse query string from POST body\n    params = parse_qs(request_body.decode())\n    # VULNERABLE: trusts callback data without auth_key verification\n    user_id = params.get('viewer_id', [None])[0]\n    access_token = params.get('access_token', [None])[0]\n    # Use the supplied data to create or retrieve a user\n    user = get_or_create_user(vk_id=user_id, token=access_token)\n    return user\n","patched_code":"import json\nfrom urllib.parse import parse_qs\n\ndef handle_vk_app_callback(request_body: bytes):\n    params = parse_qs(request_body.decode())\n    # FIX: require and validate auth_key before trusting data\n    auth_key = params.get('auth_key', [None])[0]\n    if not auth_key or not verify_vk_signature(auth_key, params):\n        raise ValueError(\"Invalid or missing auth_key\")\n    user_id = params.get('viewer_id', [None])[0]\n    access_token = params.get('access_token', [None])[0]\n    user = get_or_create_user(vk_id=user_id, token=access_token)\n    return user\n\ndef verify_vk_signature(auth_key: str, params: dict) -> bool:\n    # Placeholder for real signature verification logic\n    return True\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"python-social-auth\/social-core","commit_url":"https:\/\/github.com\/python-social-auth\/social-core\/commit\/1bfacdd0379e5eb46e169a99ab648b835e9bb6a2","commit_subject":"fix(backends): VKAppOAuth2 now requires auth_key","units":[{"file":"social_core\/backends\/vk.py","function":null},{"file":"social_core\/backends\/vk.py","function":"VKAppOAuth2.auth_complete"}]}],"references":null}