# CVE-2011-0697: Django cross-site scripting via file upload filename

Source: https://junglewise.ai/threats/cve-2011-0697-django-cross-site-scripting-via-file-upload-filename  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-07-23. Updated: 2026-05-19  
License: CC BY 4.0 with a link back

CVE-2011-0697 · Severity: medium · CVSS 6.1 · Published 2018-07-23

Django is a popular web framework used to build and manage websites. A security flaw in older versions could allow an attacker to execute malicious scripts in a user's browser by uploading a file with a specially crafted name. This could lead to unauthorized actions being performed on behalf of users or the theft of sensitive session information.

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

## Quick answers

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

**How severe is CVE-2011-0697?** Medium severity, with a CVSS score of 6.1, published 23 July 2018.

**Which products and versions are affected?** Django (PyPI) ECOSYSTEM:introduced=1.1,fixed=1.1.4, ECOSYSTEM:introduced=1.1,fixed=1.1.4,introduced=1.2,fixed=1.2.5, ECOSYSTEM:introduced=1.1,fixed=1.1.4|ECOSYSTEM:introduced=1.2,fixed=1.2.5.

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

**How is CVE-2011-0697 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2011-0697?** 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.1.4, 1.2.5 or later

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


## Technical details

A cross-site scripting (XSS) vulnerability exists in Django's file upload handling. The root cause is the improper neutralization of input when processing filenames associated with uploaded files. A remote, unauthenticated attacker can exploit this by uploading a file with a malicious payload in its filename; if this filename is subsequently rendered in a web page without proper escaping, the script will execute in the context of the victim's browser. This requires minimal user interaction (viewing the page where the filename is displayed). The issue is resolved in Django versions 1.1.4 and 1.2.5.

## Affected products

- Django Django >= 1.1, < 1.1.4; >= 1.2, < 1.2.5

## Identifiers

- CVE-2011-0697
- GHSA-8m3r-rv5g-fcpq
- PYSEC-2011-11
- PYSEC-2011-31

## Timeline

- 2011-02-08: advisory: Original Django security release announcement
- 2011-02-14: disclosed: NVD publication date
- 2018-07-23: advisory: GitHub Advisory Database publication

## References

- [https://api.github.com/users/sunSUNQ](https://api.github.com/users/sunSUNQ)
- [https://github.com/sunSUNQ](https://github.com/sunSUNQ)
- [https://api.github.com/users/sunSUNQ/gists%7B/gist_id%7D](https://api.github.com/users/sunSUNQ/gists%7B/gist_id%7D)
- [https://api.github.com/users/sunSUNQ/repos](https://api.github.com/users/sunSUNQ/repos)
- [https://avatars.githubusercontent.com/u/33311698?v=4](https://avatars.githubusercontent.com/u/33311698?v=4)
- [https://api.github.com/users/sunSUNQ/events%7B/privacy%7D](https://api.github.com/users/sunSUNQ/events%7B/privacy%7D)

## 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)
