CVE-2013-2132: Pymongo Use Of NullPointerException Catch To Vulnerability
MODERATECVE-2013-2132 is a MODERATE use of nullpointerexception catch to vulnerability (CWE-395: Use of NullPointerException Catch to Detect NULL Pointer Dereference) affecting Pymongo libraries in the PyPI ecosystem. The issue involves use of nullpointerexception catch to detect null pointer dereference in pymongo. Remediation is available by upgrading affected packages to version 2.5.2.
CVE-2013-2132 at a Glance
How to Fix CVE-2013-2132
To remediate this vulnerability, upgrade all affected Pymongo 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 pymongo>=2.5.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pymongo
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2013-2132, inspect your installed packages using pip:
pip show pymongo
Analyze the terminal output to locate any version of Pymongo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.2), your application is affected.
Note: The pip show pymongo command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-395: Use of NullPointerException Catch to Detect NULL Pointer Dereference, where catching nullpointerexception should not be used as an alternative to programmatic checks to prevent dereferencing a null pointer. In Pymongo, 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-2013-2132 Affected Pymongo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pymongo
|
PyPI |
< 2.5.2
|
2.5.2
|
References
Frequently Asked Questions
What is CVE-2013-2132?
Which Pymongo versions are affected?
What version fixes CVE-2013-2132?
Is pymongo affected?
What CWE is associated with CVE-2013-2132?
How can I check PyPI dependencies for CVE-2013-2132?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x33v-f3gp-gw2c",
"modified" : "2024-10-15T16:20:38Z",
"published" : "2022-05-14T02:10:10Z",
"aliases" : [ "CVE-2013-2132" ],
"summary" : "Use of NullPointerException Catch to Detect NULL Pointer Dereference in Pymongo",
"details" : "bson/_cbsonmodule.c in the mongo-python-driver (aka. pymongo) before 2.5.2, as used in MongoDB, allows context-dependent attackers to cause a denial of service (NULL pointer dereference and crash) via vectors related to decoding of an \"invalid DBRef.\"",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pymongo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.5.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-2132"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-python-driver/commit/a060c15ef87e0f0e72974c7c0e57fe811bbd06a2"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710597"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mongodb/mongo-python-driver"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pymongo/PYSEC-2013-30.yaml"
}, {
"type" : "WEB",
"url" : "https://jira.mongodb.org/browse/PYTHON-532"
}, {
"type" : "WEB",
"url" : "https://lists.opensuse.org/opensuse-updates/2013-06/msg00180.html"
}, {
"type" : "WEB",
"url" : "https://seclists.org/oss-sec/2013/q2/447"
}, {
"type" : "WEB",
"url" : "https://ubuntu.com/usn/usn-1897-1"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2013/dsa-2705"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-395" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-08T19:07:51Z",
"nvd_published_at" : "2013-08-15T17:55:00Z"
}
}