GHSA-785H-76CM-CPMF

GHSA-785H-76CM-CPMF is a low-severity cross-site scripting (XSS) vulnerability in django-tomselect (pip), affecting versions < 2025.3.3. It is fixed in 2025.3.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Django TomSelect incomplete escaping of dangerous characters in widget attributes

User supplied values passed through to certain attributes in form widgets are not fully escaped for potentially dangerous tokens, and in some cases are rendered in browser as valid html tags.

Details

Attributes passed to the widget (such as label_field) containing <, >, and similar tokens are not fully escaped. This results in some raw values reaching the widget, and rendering in part or fully.

For example, a label of: "Test User <script>I can pass this to the label_field and it gets rendered</script>" is rendered in the choices's label visually as "Test User " with the trailing space, and what appears as an un-executed script tag following it (which is visible when viewing source).

The actual output rendered in the browser for this example is: <div role="option" data-value="63f205b6" class="item" data-ts-item="">Test User <script>I can pass this to the label_field and it gets rendered</script></div>

The script tags appears to be valid in Chrome dev tools, but doesn't appear execute code.

Impact

Although the risk may be mediated since the content within the rendered <script></script> tags does not seem to actually/immediately run, potential may exist for other ways of increasing the risk (e.g.: code injection). In addition, the widget does not display correctly for valid strings containing < or >. Valid use-cases for printing these characters include widget label fields displaying email addresses (e.g.: "User Jane <[email protected]>"

Because of the relatively small number of users at this moment, our plan to yank affected releases on PyPI and GitHub, and because raw text is rendered but does not seem to be executable, I am marking the Severity Low.

Update to version 5.3.3. The only difference from 5.3.2 is the code and documentation changes to resolve this vulnerability, so the update process should not be problematic.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Affected versions

django-tomselect (< 2025.3.3)

Security releases

django-tomselect → 2025.3.3 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade django-tomselect to 2025.3.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-785H-76CM-CPMF? GHSA-785H-76CM-CPMF is a low-severity cross-site scripting (XSS) vulnerability in django-tomselect (pip), affecting versions < 2025.3.3. It is fixed in 2025.3.3. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which versions of django-tomselect are affected by GHSA-785H-76CM-CPMF? django-tomselect (pip) versions < 2025.3.3 is affected.
  3. Is there a fix for GHSA-785H-76CM-CPMF? Yes. GHSA-785H-76CM-CPMF is fixed in 2025.3.3. Upgrade to this version or later.
  4. Is GHSA-785H-76CM-CPMF exploitable, and should I be worried? Whether GHSA-785H-76CM-CPMF is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-785H-76CM-CPMF is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-785H-76CM-CPMF? Upgrade django-tomselect to 2025.3.3 or later.

Stop the waste.
Protect your environment with Kodem.