# CVE-2019-3498: Django improper input validation in 404 error handler

Source: https://junglewise.ai/threats/cve-2019-3498-django-improper-input-validation-in-404-error-handler  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-01-09. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2019-3498 · Severity: low · CVSS 3 · Published 2019-01-09

Django, a popular Python web framework, contains a flaw in how it displays error messages on 404 (page not found) error pages. An attacker can craft a malicious URL that, when a user visits it, causes Django to display forged content on the error page. A user who doesn't carefully examine the URL or browser address bar may be tricked into believing they are viewing legitimate content, potentially leading to credential theft or malware distribution.

Technologies: [Django (PyPI)](https://junglewise.ai/threats/technologies/django). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2019-3498 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2019-3498 being exploited in the wild.

**How severe is CVE-2019-3498?** Low severity, with a CVSS score of 3, published 9 January 2019.

**Which products and versions are affected?** Django (PyPI) ECOSYSTEM:introduced=1.11,fixed=1.11.18,introduced=2.0,fixed=2.0.10,introduced=2.1,fixed=2.1.5, ECOSYSTEM:introduced=1.11a1,fixed=1.11.18.

**Is there a fix for CVE-2019-3498?** Yes. Django (PyPI): upgrade to 1.11.18, 2.1.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2019-3498 attacked?** It is attacked over the network.

**Am I affected by CVE-2019-3498?** Check whether you run Django (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Django (PyPI): upgrade to 1.11.18, 2.1.5 or later

  ```sh
  pip install "Django>=2.1.5"
  ```


## Technical details

The vulnerability is an improper neutralization of special elements (CWE-20) in the django.views.defaults.page_not_found() function. When a requested URL does not exist, Django displays a 404 error page that includes the attempted URL. The function fails to properly sanitize or escape the URL in the error page output, allowing an attacker to inject HTML or JavaScript that will be rendered in the user's browser. The attack requires user interaction (the user must click a malicious link), but no authentication is needed. An attacker can exploit this to perform content spoofing attacks. Patches are available in Django 1.11.18, 2.0.10, and 2.1.5.

## Affected products

- Django Django 1.11.x before 1.11.18, 2.0.x before 2.0.10, 2.1.x before 2.1.5

## Identifiers

- CVE-2019-3498
- GHSA-337x-4q8g-prc5
- PYSEC-2019-17

## Timeline

- 2019-01-09: disclosed
- 2019-01-14: advisory
- 2019-01: patched

## References

- [https://docs.djangoproject.com/en/dev/releases/security](https://docs.djangoproject.com/en/dev/releases/security)

## Related threats

- [Django GeoDjango unbounded recursion denial of service](https://junglewise.ai/threats/cve-2026-15830-django-geodjango-unbounded-recursion-denial-of-service)
- [Django GeoDjango spatial lookups file write and request forgery](https://junglewise.ai/threats/cve-2026-15307-django-geodjango-spatial-lookups-file-write-and-request-forgery)
- [PYSEC-2026-2449 - Django has a Race Condition vulnerability](https://junglewise.ai/threats/cve-2026-25674-django-has-a-race-condition-vulnerability)
- [PYSEC-2026-1296 - Django vulnerable to partial directory traversal via archives](https://junglewise.ai/threats/cve-2025-59682-django-vulnerable-to-partial-directory-traversal-via-archives)
- [Django DomainNameValidator header injection via newline characters](https://junglewise.ai/threats/cve-2026-53878-django-domainnamevalidator-header-injection-via-newline)
