CVE-2024-52296: Libosdp LibOSDP Vulnerable To A Null Vulnerability

MODERATE
Advisory Identifier: GHSA-7945-5mcv-f2pp
CVSS 6.5
CWE-476
Published
Advisory Summary

CVE-2024-52296 is a MODERATE (CVSS 6.5) libosdp vulnerable to a null vulnerability (CWE-476: NULL Pointer Dereference) affecting Libosdp libraries in the PyPI ecosystem. The issue involves libosdp vulnerable to a null pointer deref in osdp_reply_name. Remediation is available by upgrading affected packages to version 2.4.0.

CVE-2024-52296 at a Glance

CVE Identifier CVE-2024-52296
GHSA Identifier GHSA-7945-5mcv-f2pp
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product Libosdp
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2024-52296

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

libosdp fixed: 2.4.0
pip install libosdp>=2.4.0
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 libosdp

How to Check if You Are Affected

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

pip show libosdp

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

Note: The pip show libosdp command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In Libosdp, 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

### Issue: At ospd_common.c, on the osdp_reply_name function, any reply id between REPLY_ACK and REPLY_XRD is valid, but names array do not declare all of the range. On a case of an undefined reply id within the range, name will be null (`name = names[reply_id - REPLY_ACK];`). Null name will casue a crash on next line: `if (name[0] == '\0')` as null[0] is invalid. ### Attack: As this logic is not limited to a secure connection, attacker may trigger this vulnerability without any prior knowledge. ### Impact Denial of Service ### Patch The issue has been patched in 24409e98a260176765956ec766a04cb35984fab1

CVE-2024-52296 Affected Libosdp Versions

1 component(s)
Fixed Versions:
2.4.0
Product / Package Ecosystem Affected Versions Fixed Version
libosdp
PyPI
< 2.4.0
2.4.0

References

Frequently Asked Questions

What is CVE-2024-52296?
CVE-2024-52296 is a security vulnerability in Libosdp involving LibOSDP vulnerable to a null pointer deref in osdp_reply_name under CWE-476: NULL Pointer Dereference.
Which Libosdp versions are affected?
Affected versions include releases prior to 2.4.0 across affected packages: libosdp.
What version fixes CVE-2024-52296?
Upgrading to 2.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is libosdp affected?
Yes, libosdp is affected in releases prior to 2.4.0. Upgrade your dependency to 2.4.0 or later.
What is the CVSS score of CVE-2024-52296?
CVE-2024-52296 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-52296?
CVE-2024-52296 is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check PyPI dependencies for CVE-2024-52296?
Run the dependency tree command: 'pip show libosdp'. 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-7945-5mcv-f2pp",
  "modified" : "2024-11-12T21:32:15Z",
  "published" : "2024-03-08T17:33:46Z",
  "aliases" : [ "CVE-2024-52296" ],
  "summary" : "LibOSDP vulnerable to a null pointer deref in osdp_reply_name",
  "details" : "### Issue:\nAt ospd_common.c, on the osdp_reply_name function, any reply id between REPLY_ACK and REPLY_XRD is valid, but names array do not declare all of the range. On a case of an undefined reply id within the range, name will be null (`name = names[reply_id - REPLY_ACK];`). Null name will casue a crash on next line: `if (name[0] == '\\0')` as null[0] is invalid.\n\n### Attack:\nAs this logic is not limited to a secure connection, attacker may trigger this vulnerability without any prior knowledge.\n\n### Impact\nDenial of Service\n\n### Patch\nThe issue has been patched in 24409e98a260176765956ec766a04cb35984fab1\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "libosdp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/goToMain/libosdp/security/advisories/GHSA-7945-5mcv-f2pp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52296"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goToMain/libosdp/commit/24409e98a260176765956ec766a04cb35984fab1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/goToMain/libosdp"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-08T17:33:46Z",
    "nvd_published_at" : "2024-11-12T16:15:26Z"
  }
}