/

CVE-2026-57178

Severity:

HIGH RISK

(7.4)

Improper Authentication (CWE-287) in Python Social Auth

CVE-2026-57178

Awaiting Analysis

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287, CWE-347

Impact:

Authentication Bypass and Account Impersonation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Python Social Auth's vk-app backend could accept VK callback data without verifying its signature when the auth_key parameter was absent. An attacker may submit unsigned, attacker-controlled identity fields and potentially authenticate as an arbitrary VK user in applications using this backend.

Affected context

The issue occurs in applications that use Python Social Auth's vk-app backend to process VK application callbacks. Risk exists when the backend accepts callback data without requiring and validating the expected auth_key, allowing identity-related fields to be trusted before the callback's authenticity has been established.

Exploit preconditions

  • Attack surface: The VK application callback endpoint handled by the vk-app backend
  • Required access: Ability to send or influence callback parameters; a legitimate VK account or prior application access may not be required
  • Trigger point: Processing a callback where auth_key is missing
  • Why exploitation is possible: The backend may treat attacker-supplied identity fields as verified when signature validation is skipped

Why this happens

The underlying bug is a failure to enforce authentication of external identity assertions. When a callback signature is optional rather than mandatory, the application can process untrusted values such as user identifiers and tokens as though they originated from VK.

This maps primarily to CWE-287: Improper Authentication because the backend does not reliably establish the authenticity of the identity claim. It also relates to CWE-347: Improper Verification of Cryptographic Signature, because signed callback data is not consistently required and verified before trust is granted.

Potential impact

  • An attacker may authenticate as an arbitrary VK user ID
  • Applications could create or access accounts under an impersonated identity
  • User data and account-linked actions could be exposed or manipulated
  • Downstream authorization decisions may be made for the wrong user
  • Fraudulent registrations or account takeover scenarios could occur

General mitigation guidance

Mitigation generally focuses on making callback authenticity verification mandatory and fail-closed.

Common defensive patterns include:

  • Require the callback signature parameter to be present for every supported flow
  • Verify signatures using the provider's documented cryptographic process before reading identity fields
  • Reject missing, malformed, expired, or invalid callback data
  • Bind validated identities to the expected application, redirect flow, and session context
  • Avoid using user-controlled fields for authorization until provider verification succeeds
  • Apply least privilege to identities created through social-login workflows
  • Treat access tokens and callback metadata as untrusted until independently validated

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis and code searches for optional signature checks or branches that continue after verification failure
  • Review of social-login handlers for trust decisions made before cryptographic validation
  • Tests covering missing, malformed, altered, and replayed callback signatures
  • Policy enforcement requiring fail-closed behavior for external identity assertions
  • Runtime monitoring for unusual callback parameters, unexpected user-identity changes, and authentication events without corresponding provider verification

Automated code review and security scanning tools may help flag incomplete signature validation, although manual review is useful for confirming authentication-flow semantics.

Sources

SourceLink
github.comgithub.com/python-social-auth/social-core/security/advisories/GHSA-3c93-f73f-qc9h

Frequently asked

questions

It can be exploitable through the application's VK callback endpoint when the application uses the affected vk-app backend and accepts unsigned callback data.

The attacker generally needs to send crafted callback parameters to the authentication flow. Access to the application's server or local files is not inherently required.

Require the signature parameter, verify it before trusting any callback fields, and reject the entire callback when validation fails or required data is absent.

Use fail-closed authentication handlers, test negative verification cases, keep identity data untrusted until cryptographic validation succeeds, and review social-login integrations for complete provider-signature enforcement.

Find out what's already
exploitable in your codebase.