Description
django-filter is a generic system for filtering Django QuerySets based on user selections. In django-filter before version 2.4.0, automatically 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. Version 2.4.0+ applies a `MaxValueValidator` with a a default `limit_value` of 1e50 to the form field used by `NumberFilter` instances. In 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. Users may manually apply an equivalent validator if they are not able to upgrade.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| carltongibson | django-filter | < 2.4.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | django-filter | 2.4.0-1 | — |
| Debian 13 | django-filter | 2.4.0-1 | — |
| Debian 12 | django-filter | 2.4.0-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | django-filter | No fix yet | — |
| Ubuntu 26.04 LTS | django-filter | No fix yet | — |
| Ubuntu 25.10 | django-filter | No fix yet | — |
| Ubuntu 24.04 LTS | django-filter | No fix yet | — |
| Ubuntu 22.04 LTS | django-filter | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | django-filter | No fix yet | — |
| Ubuntu 18.04 LTS | django-filter | No fix yet | — |
| Ubuntu 16.04 LTS | django-filter | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django-filter | < 2.4.0 | 2.4.0 | GHSA-x7gm-rfgv-w973 |
References
- https://github.com/carltongibson/django-filter/security/advisories/GHSA-x7gm-rfgv-w973
- https://github.com/carltongibson/django-filter/commit/340cf7a23a2b3dcd7183f6a0d6c383e85b130d2b
- https://github.com/carltongibson/django-filter/releases/tag/2.4.0
- https://pypi.org/project/django-filter/
- https://security.netapp.com/advisory/ntap-20210604-0010/
- FEDORA-2021-f213fea441 vendor-advisory
- FEDORA-2021-1acbee2459 vendor-advisory
- FEDORA-2023-4dee6d0a76 vendor-advisory