Django vulnerable to Improper Restriction of Operations within the Bounds of a Memory BufferGHSA-5h2q-4hrp-v9rr
HIGHFix: django/django@9ca0ff6GHSA-5h2q-4hrp-v9rr is a high-severity (CVSS 7.5) Buffer Overflow vulnerability in django. A fix is available for django — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
django🐍djangoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
The get_image_dimensions function in the image-handling functionality in Django before 1.3.2 and 1.4.x before 1.4.1 uses a constant chunk size in all attempts to determine dimensions, which allows remote attackers to cause a denial of service (process or thread consumption) via a large TIFF image.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | django | all versions | 1.3.2pip install --upgrade 'django==1.3.2' |
| 🐍PyPI | django | ≥ 1.4&&< 1.4.1 | 1.4.1pip install --upgrade 'django==1.4.1' |
Affected Products
djangodjangoprojectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update django to 1.3.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5h2q-4hrp-v9rr is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Frequently Asked Questions
Is GHSA-5h2q-4hrp-v9rr in your dependencies?
Find it across PyPI, including transitive dependencies.