CVE-2024-32879: Social auth app django Social-auth-app-django Affected By Improper Handling Vulnerability

MODERATE
Advisory Identifier: GHSA-2gr8-3wc7-xhj3
CVSS 4.9
CWE-303 CWE-178
Published
Advisory Summary

CVE-2024-32879 is a MODERATE (CVSS 4.9) social-auth-app-django affected by improper handling vulnerability (CWE-303: Incorrect Implementation of Authentication Algorithm) affecting Social auth app django libraries in the PyPI ecosystem. The issue involves social-auth-app-django affected by improper handling of case sensitivity. Remediation is available by upgrading affected packages to version 5.4.1.

CVE-2024-32879 at a Glance

CVE Identifier CVE-2024-32879
GHSA Identifier GHSA-2gr8-3wc7-xhj3
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-303: Incorrect Implementation of Authentication Algorithm
Affected Product Social auth app django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-32879

To remediate this vulnerability, upgrade all affected Social auth app django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

social-auth-app-django fixed: 5.4.1
pip install social-auth-app-django>=5.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show social-auth-app-django

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-32879, inspect your installed packages using pip:

pip show social-auth-app-django

Analyze the terminal output to locate any version of Social auth app django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.4.1), your application is affected.

Note: The pip show social-auth-app-django command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-303: Incorrect Implementation of Authentication Algorithm, where the requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect. In Social auth app django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Due to default case-insensitive collation in MySQL or MariaDB databases, third-party authentication user IDs are not case-sensitive and could cause different IDs to match. ### Patches This issue has been addressed by https://github.com/python-social-auth/social-app-django/pull/566 and fix released in 5.4.1. ### Workarounds An immediate workaround would be to change collation of the affected field: ```mysql ALTER TABLE `social_auth_usersocialauth` MODIFY `uid` varchar(255) COLLATE `utf8_bin`; ``` ### References This issue was discovered by folks at https://opencraft.com/.

CVE-2024-32879 Affected Social auth app django Versions

1 component(s)
Fixed Versions:
5.4.1
Product / Package Ecosystem Affected Versions Fixed Version
social-auth-app-django
PyPI
< 5.4.1
5.4.1

References

Frequently Asked Questions

What is CVE-2024-32879?
CVE-2024-32879 is a security vulnerability in Social auth app django involving social-auth-app-django affected by Improper Handling of Case Sensitivity under CWE-303: Incorrect Implementation of Authentication Algorithm.
Which Social auth app django versions are affected?
Affected versions include releases prior to 5.4.1 across affected packages: social-auth-app-django.
What version fixes CVE-2024-32879?
Upgrading to 5.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is social-auth-app-django affected?
Yes, social-auth-app-django is affected in releases prior to 5.4.1. Upgrade your dependency to 5.4.1 or later.
What is the CVSS score of CVE-2024-32879?
CVE-2024-32879 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-32879?
CVE-2024-32879 is classified under CWE-303: Incorrect Implementation of Authentication Algorithm (The requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect.).
How can I check PyPI dependencies for CVE-2024-32879?
Run the dependency tree command: 'pip show social-auth-app-django'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2gr8-3wc7-xhj3",
  "modified" : "2024-08-28T20:09:46Z",
  "published" : "2024-04-24T18:47:21Z",
  "aliases" : [ "CVE-2024-32879" ],
  "summary" : "social-auth-app-django affected by Improper Handling of Case Sensitivity",
  "details" : "### Impact\nDue to default case-insensitive collation in MySQL or MariaDB databases, third-party authentication user IDs are not case-sensitive and could cause different IDs to match.\n\n### Patches\nThis issue has been addressed by https://github.com/python-social-auth/social-app-django/pull/566 and fix released in 5.4.1.\n\n### Workarounds\nAn immediate workaround would be to change collation of the affected field:\n\n```mysql\nALTER TABLE `social_auth_usersocialauth` MODIFY `uid` varchar(255) COLLATE `utf8_bin`;\n```\n\n### References\nThis issue was discovered by folks at https://opencraft.com/.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "social-auth-app-django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/python-social-auth/social-app-django/security/advisories/GHSA-2gr8-3wc7-xhj3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-32879"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-social-auth/social-app-django/pull/566"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-social-auth/social-app-django/commit/31c3e0c7edb187004d8abbde7e9c4f7ef9098138"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python-social-auth/social-app-django"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-178", "CWE-303" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-24T18:47:21Z",
    "nvd_published_at" : "2024-04-24T20:15:07Z"
  }
}