CVE-2024-56374
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAn issue was discovered in Django 5.1 before 5.1.5, 5.0 before 5.0.11, and 4.2 before 4.2.18. Lack of upper-bound limit enforcement in strings passed when performing IPv6 validation could lead to a potential denial-of-service attack. The undocumented and private functions clean_ipv6_address and is_valid_ipv6_address are vulnerable, as is the django.forms.GenericIPAddressField form field. (The django.db.models.GenericIPAddressField model field is not affected.)
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceDjango's IPv6 address validation functions (clean_ipv6_address and is_valid_ipv6_address) lack upper-bound limit enforcement on input strings, allowing an attacker to submit excessively long strings that consume excessive CPU/processing time leading to denial-of-service. The django.forms.GenericIPAddressField form field is vulnerable while the model field is not.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 4.2, < 4.2.18>= 5.0, < 5.0.11>= 5.1, < 5.1.5= 11.0CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Django versionRun 'python -c import django; print(django.VERSION)' or check your requirements/pip list for django package versionAffected if Version is >= 4.2 and < 4.2.18, or >= 5.0 and < 5.0.11, or >= 5.1 and < 5.1.5
-
Identify usage of GenericIPAddressField in formsSearch your codebase for 'from django import forms' and 'GenericIPAddressField' in your forms.py files, or run 'grep -r "GenericIPAddressField" --include="*.py"' in your project directoryAffected if Any form class uses GenericIPAddressField
-
Check if GenericIPAddressField receives untrusted user inputReview your views and forms to see if GenericIPAddressField is used in forms that process HTTP request data (e.g., Form classes bound to request.POST or request.GET)Affected if Forms with GenericIPAddressField are used to process external user input without application-layer length limits
-
Inspect input length validationLook for 'max_length' parameters on GenericIPAddressField definitions or custom validators that limit input length, and check form cleaning methods for length checksAffected if No max_length is set on the field and no manual length validation exists in the form's clean method
You are affected if your Django version is in the vulnerable range AND your application uses django.forms.GenericIPAddressField to process external user input without enforcing input length limits.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped4.2.185.0.115.1.5
Upgrade Django to version 5.1.5, 5.0.11, or 4.2.18 or later. Additionally, audit applications using django.forms.GenericIPAddressField and consider adding application-layer input length limits as defense-in-depth.
Django 4.2.18, 5.0.11, or 5.1.5 (depending on your current major version branch)
- Check the currently installed Django version using `python -m django --version` or inspecting requirements.txt/Pipfile
- Upgrade Django to a fixed version based on your current major version: for Django 4.2.x upgrade to 4.2.18, for 5.0.x upgrade to 5.0.11, for 5.1.x upgrade to 5.1.5
- Run `pip install --upgrade Django==<fixed_version>` (e.g., `pip install --upgrade Django==5.1.5`)
- Verify the upgrade was successful by running `python -m django --version`
- Run your project's test suite to ensure no regressions were introduced
- If using GenericIPAddressField in forms, verify IPv6 validation still functions correctly in your application
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-56374 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-56374 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data