Potential cross-site scripting vulnerability in truncatechars_html
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
Summary
An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. The `truncatechars_html` template filter and the `django.utils.text.Truncator.chars()` method (with `html=True`) are subject to a potential cross-site scripting (XSS) attack when certain inputs whose text length matches the truncation length are processed and rendered in an HTML attribute. Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected. Django would like to thank JoeCyberTech for reporting this issue.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| djangoproject | Django | 6.1 to before 6.1.4; 6.0 to before 6.0.11; 5.2 to before 5.2.20 | 6.1.4, 6.0.11, 5.2.20 | Patch available | CNA |
- Django Vendordjangoproject Affected 6.1 to before 6.1.4; 6.0 to before 6.0.11; 5.2 to before 5.2.20 Fixed in 6.1.4, 6.0.11, 5.2.20 Patch available CNA
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | — | — | djangoproject |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions — — ·djangoproject
Remediation
- Fix · CNA Django (djangoproject) Fixed in 6.1.4, 6.0.11, 5.2.20
Timeline
- 2026-12-02 Threatist record created from CVE-2026-115868
References
Patch 4
- https://github.com/django/django/commit/454f44fc8f52d0b925a7661b9809061f257eeac9
- https://github.com/django/django/commit/7cf220a2486a7c5944893818bad9a6bbaebc48df
- https://github.com/django/django/commit/aaf82df0c772d98a71b740a331fccc0accb818a3
- https://github.com/django/django/commit/781dd5f5d53b6848dce649582d30bef4f0f94f67
More djangoproject vulnerabilities
- TI-2022-15177 An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. CVSS 3.1CRITICAL 9.8
- TI-2020-05994 Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection… CVSS 3.1CRITICAL 9.8
- TI-2019-14306 Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. CVSS 3.1CRITICAL 9.8
- TI-2023-10198 An issue was discovered in the Multipart Request Parser in Django 3.2 before 3.2.18, 4.0… CVSS 3.1HIGH 7.5
- TI-2019-10595 An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x… CVSS 3.0CRITICAL 9.8
- TI-2021-14006 Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection… CVSS 3.1CRITICAL 9.8
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences