Vulnerabilities in pkg:pypi/django-filter
PACKAGECVE-2020-15225 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-681: Incorrect Conversion between Numeric Types) affecting Django filter libraries in the PyPI ecosystem. The issue involves potential dos with numberfilter conversion to integer values.. Remediation is available by upgrading affected packages to version 2.4.0.
pkg:pypi/django-filter
Vulnerability advisories affecting package pkg:pypi/django-filter. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-x7gm-rfgv-w973 | CVE-2020-15225 | HIGH | Potential DoS with NumberFilter conversion to integer values. |
CVE-2020-15225 at a Glance
Security Impact
CVSS: 7.5
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:N/I:N/A:H).
How to Fix CVE-2020-15225
To remediate this vulnerability, upgrade all affected Django filter 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 django-filter>=2.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show django-filter
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-15225, inspect your installed packages using pip:
pip show django-filter
Analyze the terminal output to locate any version of Django filter 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 django-filter command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-681: Incorrect Conversion between Numeric Types, where when converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. if the resulting values are used in a sensitive context, then dangerous behaviors may occur. In Django filter, 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-2020-15225 Affected Django filter Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
django-filter
|
PyPI |
< 2.4.0
|
2.4.0
|
References
Frequently Asked Questions
What is CVE-2020-15225?
Which Django filter versions are affected?
What version fixes CVE-2020-15225?
Is django-filter affected?
What is the CVSS score of CVE-2020-15225?
What CWE is associated with CVE-2020-15225?
How can I check PyPI dependencies for CVE-2020-15225?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x7gm-rfgv-w973",
"modified" : "2024-09-16T22:10:02Z",
"published" : "2020-09-28T19:05:29Z",
"aliases" : [ "CVE-2020-15225" ],
"summary" : "Potential DoS with NumberFilter conversion to integer values.",
"details" : "### Impact\n\nAutomatically generated `NumberFilter` instances, whose value was later converted to an integer, were subject to potential DoS from maliciously input using exponential format with sufficiently large exponents. \n\n### Patches\n\nVersion 2.4.0+ applies a `MaxValueValidator` with a a default `limit_value` of 1e50 to the form field used by `NumberFilter` instances. \n\nIn addition, `NumberFilter` implements the new `get_max_validator()` which should return a configured validator instance to customise the limit, or else `None` to disable the additional validation. \n\n### Workarounds\n\nUsers may manually apply an equivalent validator if they are not able to upgrade. \n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the django-filter repo](https://github.com/carltongibson/django-filter)\n\nThanks to Marcin Waraksa for the report. \n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "django-filter"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/carltongibson/django-filter/security/advisories/GHSA-x7gm-rfgv-w973"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15225"
}, {
"type" : "WEB",
"url" : "https://github.com/carltongibson/django-filter/commit/340cf7a23a2b3dcd7183f6a0d6c383e85b130d2b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/carltongibson/django-filter"
}, {
"type" : "WEB",
"url" : "https://github.com/carltongibson/django-filter/releases/tag/2.4.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django-filter/PYSEC-2021-64.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DPHENTRHRAYFXYPPBT7JRHZRWILRY44S"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FAT2ZAEF6DM3VFSOHKB7X3ASSHGQHJAK"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SVJ7AYU6FUSU3F653YCGW5LFD3IULRSX"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/django-filter"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20210604-0010"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-681" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-09-28T19:04:39Z",
"nvd_published_at" : "2021-04-29T21:15:00Z"
}
}