# CVE-2026-115868: Django truncatechars_html cross-site scripting

Source: https://junglewise.ai/threats/cve-2026-115868-an-issue-was-discovered-in-django-6-1-before-6-1-4-6-0-before-6  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-12-02. Updated: 2026-12-02  
License: CC BY 4.0 with a link back

CVE-2026-115868 · Severity: medium · CVSS 6.1 · Published 2026-12-02

Django is a popular Python web framework used to build web applications. The `truncatechars_html` template filter can be exploited to inject malicious scripts into web pages when certain text inputs matching the truncation length are rendered in HTML attributes. An attacker can use this to steal user sessions, hijack accounts, or deface web content.

Technologies: [Django Software Foundation Django](https://junglewise.ai/threats/technologies/django-software-foundation-django). Vendors: [Django Software Foundation](https://junglewise.ai/threats/vendors/django-software-foundation).

## Quick answers

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

**How severe is CVE-2026-115868?** Medium severity, with a CVSS score of 6.1, published 2 December 2026.

**Which products and versions are affected?** Django Software Foundation Django 6.1 before 6.1.4, 6.0 before 6.0.11, 5.2 before 5.2.20.

**Is there a fix for CVE-2026-115868?** Yes: fixed in Django 6.1.4, 6.0.11, 5.2.20. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2026-115868?** Check whether you run Django Software Foundation Django 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

- Fixed in Django 6.1.4, 6.0.11, 5.2.20

## Technical details

A cross-site scripting (XSS) vulnerability exists in the `truncatechars_html` template filter and `django.utils.text.Truncator.chars()` method with `html=True`, triggered when inputs whose text length matches the truncation length are processed and rendered in HTML attributes. The vulnerability requires the application to use this filter or method on user-controlled or untrusted input rendered in an HTML context. Unsupported Django series (5.1.x, 5.0.x, 4.2.x and potentially earlier) may also be affected but were not formally evaluated.

## Affected products

- Django Software Foundation Django 6.1 before 6.1.4, 6.0 before 6.0.11, 5.2 before 5.2.20

## Timeline

- 2026-12-02: disclosed

## References

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

## Related threats

- [Django heap buffer overflow in OGRGeometry.wkb](https://junglewise.ai/threats/cve-2026-132809-an-issue-was-discovered-in-django-6-1-before-6-1-4-6-0-before-6)
- [Django SQL injection in range and in lookups](https://junglewise.ai/threats/cve-2026-132092-an-issue-was-discovered-in-django-6-1-before-6-1-4-6-0-before-6)
- [Django RasterField server-side file write vulnerability](https://junglewise.ai/threats/cve-2026-124827-an-issue-was-discovered-in-django-6-1-before-6-1-4-6-0-before-6)
- [Django GIS spatial reference string injection](https://junglewise.ai/threats/cve-2026-114582-an-issue-was-discovered-in-django-6-1-before-6-1-3-6-0-before-6)
- [Django SSRF in GeoJSON coordinate reference systems](https://junglewise.ai/threats/cve-2026-111362-an-issue-was-discovered-in-django-6-1-before-6-1-3-6-0-before-6)
