Sep 25, 2026·6 min read·20 visits
Multi-tenant integrations of python-social-auth using the Vend OAuth2 backend are vulnerable to complete account takeover because the library incorrectly relies on non-unique, shop-local numeric user IDs for database mappings.
An identity binding collision vulnerability in the Vend OAuth2 backend of python-social-auth (social-core) before version 5.0.0 allows unauthenticated remote attackers to take over local accounts in multi-tenant configurations. The flaw stems from relying on shop-local numeric user IDs as global social-auth identifiers, leading to collisions when identical IDs exist across distinct tenants.
The python-social-auth library (specifically via the social-core package) provides a federated identity mapping framework for Python web applications. One of its integrated modules is the VendOAuth2 backend, which handles authentication via Vend, a cloud-based point-of-sale (POS) platform.
In standard deployments, the backend authenticates users from external identity providers and associates their unique federated identifier (UID) with a local database record. This lookup acts as the primary access token validation step to establish active user sessions. The attack surface exists on any deployed Python web application using this backend that is configured as a multi-tenant OAuth application.
This vulnerability is classified as an Identity Binding Collision under CWE-289 (Authentication Bypass by Alternate Name). In multi-tenant environments, the unpatched library allows an attacker with a valid account on a specific tenant shop to authenticate and hijack a victim's account registered on a separate tenant shop, provided both accounts share the same numeric ID sequence.
The root cause of this vulnerability lies in a mismatch between the tenant isolation architecture of the Vend platform and the identity mapping design of the social-core library. Vend operates on a multi-tenant infrastructure where each merchant or shop operates inside its own isolated subdomain (e.g., shop-a.vendhq.com and shop-b.vendhq.com).
Inside individual shops, user records are indexed using auto-incrementing integers (e.g., id = 7). Because these integer sequences restart or increment independently per tenant, user ID values collide across different shops. User ID 7 exists in shop-a, and an unrelated User ID 7 exists in shop-b.
Prior to version 5.0.0, the VendOAuth2 backend class did not override the default unique identifier generation logic. It relied strictly on the shop-local numeric user ID (id) returned by the Vend API as the database-level social-auth UID. Consequently, when a multi-tenant application performed a lookup for a user with ID 7, the database could return the mapping for User ID 7 from a completely different tenant shop, enabling immediate identity theft.
The security patch was introduced in Pull Request #1795 and resolved via Commit dee7ad1785877afd355dd6860598823d2631b76e. The key fix is the transition from a flat numeric ID to a composite string-based key that scopes the identifier to the specific tenant.
Below is the logic modification in social_core/backends/vend.py showing the addition of prefix validation and the composite scoping function:
# File: social_core/backends/vend.py
DOMAIN_PREFIX_RE = re.compile(
r"(?=.{1,63}\Z)[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\Z"
)
def domain_prefix(self, response=None) -> str:
prefix = (response or {}).get("domain_prefix") or self.data.get("domain_prefix")
if not prefix:
raise AuthMissingParameter(self, "domain_prefix")
if isinstance(prefix, (list, tuple)):
prefix = prefix[0] if prefix else ""
prefix = str(prefix).lower()
if not self.DOMAIN_PREFIX_RE.match(prefix):
raise AuthInvalidParameter(self, "domain_prefix")
return prefix
def scoped_uid(self, response) -> str:
user_id = response.get("id")
if user_id in (None, ""):
raise AuthMissingParameter(self, "id")
return f"{self.domain_prefix(response)}:{user_id}"The logic implements a domain verification step using a regular expression to validate the prefix structure. This blocks directory-traversal or delimiter injection attacks. The new scoped_uid method constructs a scoped identity format: domain_prefix:user_id (e.g., shop-a:7).
Additionally, the patch implements a secure migration flow in get_user_id to upgrade legacy integer UIDs to the new scoped structure. It verifies that the domain_prefix associated with the legacy session matches the active login context before modifying the mapping. This prevents attackers from claiming an existing un-scoped database entry.
To successfully exploit CVE-2026-57176, the attacker must satisfy several preconditions. First, the target system must use social-core version < 5.0.0 with the Vend backend. Second, the target system must allow logins across multiple independent Vend subdomains. Third, the attacker must have administrative or user-level access on their own independent Vend store, and their account's internal numeric ID must match the internal numeric ID of the victim's account in the target store.
The attack flow is executed as follows:
7) and initiates the OAuth login on the target application using their own shop subdomain (shop-b).7.UserSocialAuth database for a record matching provider="vend" and uid="7".shop-a) previously registered and has the same numeric ID, the application retrieves the victim's local account and establishes an active session for the attacker.The security impact of this vulnerability is severe. Successful exploitation grants complete, unauthenticated access to the victim's account on the target web application. This allows attackers to perform any actions privileged to the hijacked user, including extracting personal information, modifying transaction data, or altering configurations.
The CVSS v3.1 base score is evaluated at 6.8 (Medium). The score reflects high confidentiality and integrity impact, but complexity is rated as High (AC:H) because exploitation depends on the target application running a multi-tenant setup and the coincidental overlap of auto-incremented integer keys between independent tenants.
While this CVE is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and no public active exploits are observed, multi-tenant POS integration dashboards represent high-value targets, and the simplicity of triggering the collision makes remediation urgent.
The definitive remediation path is upgrading the social-core package to version 5.0.0 or higher, which implements the scoped identification scheme natively.
pip install --upgrade social-auth-core>=5.0.0Because the fix changes the structure of database lookups from integer values to composite string representations, database schemas must be checked. The underlying storage layer methods (get_social_auth and create_social_auth) have updated their type signatures from int to str. Administrators must ensure that the uid column of the UserSocialAuth database table (often social_auth_usersocialauth depending on the framework integration) has been migrated to support string structures like VARCHAR or equivalent.
If upgrading is not immediately possible, a temporary mitigation is to enforce strict subdomain validation. Developers should implement application-level filters that explicitly reject authentication requests if the supplied domain_prefix parameter does not match the organization's single, trusted tenant.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
social-core python-social-auth | < 5.0.0 | 5.0.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-289 |
| Attack Vector | Network |
| CVSS v3.1 | 6.8 |
| Exploit Status | No active public exploits |
| KEV Status | Not Listed |
| Impact | High Confidentiality, High Integrity (Account Takeover) |
The software performs authentication based on a name or identifier, but it does not sufficiently verify that the identifier represents the authorized identity, allowing an attacker to claim the identity of another user by providing an alternate name or identifier that resolves to the same target account.
CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.
CVE-2026-114156 is an improper resolution of path equivalence vulnerability (CWE-41) in Microsoft ASP.NET Core affecting .NET 11.0 preview releases and Microsoft Visual Studio 2026. The vulnerability stems from a discrepancy between how path prefix validation helpers (such as PathString.StartsWithSegments) and downstream routing mechanisms handle alternate path separators and percent-encoded characters. An unauthenticated remote attacker can exploit this mismatch over the network to bypass path-based authorization middleware and access restricted endpoints.
CVE-2026-114157 is a high-severity local privilege escalation and security feature bypass vulnerability affecting ASP.NET Core on Microsoft Windows. The flaw resides in the Kestrel web server's Named Pipes transport layer (Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes) and stems from a race condition (CWE-362) during broken pipe error recovery. When an active connection throws an IOException during handshake acceptance, the connection listener previously disposed of the broken NamedPipeServerStream instance before acquiring a replacement stream from its internal pool. This sequence created a momentary window where zero server instances of the named pipe existed in the Windows Named Pipe File System (NPFS). A local, low-privileged attacker can exploit this timing window to create a named pipe with the identical name and a permissive Discretionary Access Control List (DACL), hijacking subsequent inter-process communications and escalating privileges across security boundaries.
CVE-2026-124194 is a forced authentication and spoofing vulnerability in Microsoft Office Outlook caused by a missing user interface warning before dereferencing remote network paths (CWE-356). By embedding an attacker-controlled Universal Naming Convention (UNC) path within MAPI message properties such as PidLidReminderFileParameter, an unauthenticated remote attacker can force a victim's system to initiate an outbound SMB or WebDAV connection upon opening or previewing a crafted message. This automatic authentication handshake leaks the user's NetNTLMv2 hash, enabling offline password cracking or real-time NTLM relay attacks. The vulnerability was exploited in the wild as a zero-day prior to its remediation in Microsoft's November 2026 Patch Tuesday updates and is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
CVE-2026-114154 is a high-severity Denial of Service (DoS) and uncontrolled resource consumption vulnerability in the Microsoft.AspNetCore.Server.HttpSys component of ASP.NET Core. When processing an HTTP request that simultaneously contains a chunked Transfer-Encoding header, a Content-Length header, and an explicit X-Content-Length header, the server throws an unhandled ArgumentException during header normalization. In certain versions, subsequent exception handling attempts to dereference a disposed native request context, aborting error response dispatch and leaking unmanaged HTTP.sys request structures.
A local elevation of privilege vulnerability exists in the Microsoft .NET Aspire CLI (`Aspire.Cli`) versions 13.5.4 prior to 13.6.5. When executing SDK management commands (`aspire sdk generate`, `aspire sdk dump`, and `aspire sdk export`), the CLI creates temporary project directories inside the shared operating system temporary folder (such as `/tmp` on Unix-like systems) without restricting directory permissions or disabling MSBuild automatic response file resolution. A local, low-privileged attacker on a multi-user system can place a crafted `Directory.Build.rsp` file in the shared temporary directory hierarchy. When a victim user executes an affected Aspire CLI command, MSBuild traverses upward, ingests the attacker-controlled response file, and executes arbitrary commands in the security context of the victim user.