CVE-2023-29824: Withdrawn Use After Free Vulnerability
CRITICALCVE-2023-29824 is a CRITICAL (CVSS 9.8) use after free vulnerability (CWE-416: Use After Free) affecting Withdrawn libraries in the PyPI ecosystem. The issue involves use after free in scipy. Remediation is available by upgrading affected packages to version 1.8.0.
CVE-2023-29824 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-29824
To remediate this vulnerability, upgrade all affected Withdrawn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install scipy>=1.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show scipy
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-29824, inspect your installed packages using pip:
pip show scipy
Analyze the terminal output to locate any version of Withdrawn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.0), your application is affected.
Note: The pip show scipy command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In Withdrawn, 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
CVE-2023-29824 Affected Withdrawn Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
scipy
|
PyPI |
< 1.8.0
|
1.8.0
|
References
Frequently Asked Questions
What is CVE-2023-29824?
Which Withdrawn versions are affected?
What version fixes CVE-2023-29824?
Is scipy affected?
What is the CVSS score of CVE-2023-29824?
What CWE is associated with CVE-2023-29824?
How can I check PyPI dependencies for CVE-2023-29824?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jrfm-2h82-xg28",
"modified" : "2024-05-03T10:26:19Z",
"published" : "2023-07-06T21:30:28Z",
"withdrawn" : "2024-05-03T10:26:19Z",
"aliases" : [ "CVE-2023-29824" ],
"summary" : "Withdrawn: Use after free in SciPy",
"details" : "## Withdrawn Advisory\n\nThis advisory has been withdrawn because it has been found to not be an issue. Please see the issue [here](https://github.com/scipy/scipy/issues/14713#issuecomment-1629468565) for more information.\n\n ## Original Description\n\nA use-after-free issue was discovered in Py_FindObjects() function in SciPy versions prior to 1.8.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "scipy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-29824"
}, {
"type" : "WEB",
"url" : "https://github.com/scipy/scipy/issues/14713"
}, {
"type" : "WEB",
"url" : "https://github.com/scipy/scipy/issues/14713#issuecomment-1629468565"
}, {
"type" : "WEB",
"url" : "https://github.com/scipy/scipy/pull/15013"
}, {
"type" : "WEB",
"url" : "https://github.com/scipy/scipy/commit/e32fc2329d3dd23298725153c5b2cc7fcd0f14f1"
}, {
"type" : "WEB",
"url" : "http://www.square16.org/achievement/cve-2023-29824"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-416" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-22T18:55:58Z",
"nvd_published_at" : "2023-07-06T21:15:09Z"
}
}