CVE-2026-115868 Potential cross-site scripting vulnerability in truncatechars_html

Published Updated

Django's truncatechars_html filter and Truncator can render truncated text in HTML attributes, enabling XSS in apps using them.

CVSS score

Medium

5.1/10

CVSS 4.0 · Scored by DSF Breakdown
Exploited in the wild
Not known
Not in CISA's KEV catalogue
Exploit code
None known
No public exploit found
Fix
Available
6.1.4, 6.0, 6.0.11 +1
Attack path
Over the internet
No login, a user must click or open something

What is CVE-2026-115868?

CVE-2026-115868 is a medium-severity cross-site scripting vulnerability in djangoproject Django, published on 2 Dec 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-79

How severe is CVE-2026-115868?

CVE-2026-115868 scores 5.1 out of 10 under CVSS 4.0, which is medium severity. It was scored by DSF.

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
Active
Confidentiality
None
Integrity
None
Availability
None

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Which versions are affected by CVE-2026-115868?

An affected version is only exploitable if your software calls truncatechars_html or django.utils.text.Truncator.chars(). Many projects that include it are not exposed.

How do I fix CVE-2026-115868?

Upgrade djangoproject Django to the fixed version for your release line. The advisory names 6.1.4, 6.0, 6.0.11 and 5.2.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-115868 being exploited?

There is no known exploitation of CVE-2026-115868 in the wild and no public exploit code.

Sources

Also known as ALPINE-CVE-2026-115868, DEBIAN-CVE-2026-115868, GHSA-2q44-jvmf-fqjp, UBUNTU-CVE-2026-115868.

Is CVE-2026-115868 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free