CVE-2026-4093

Stored XSS in Drupal 7 Term Reference Tree module (token display templates and term labels)

Published May 21, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
In the Drupal 7 Term Reference Tree module, two stored XSS vectors exist in the widget/formatter rendering pipeline.

Vector A (token display templates): When the Token module is enabled and token display templates are configured, attacker-controlled token output (e.g., term description) is rendered without proper sanitization. Any user who can edit the referenced taxonomy terms can inject HTML/JS that executes when the field is rendered.

Vector B (term label rendering): Taxonomy term labels are not properly sanitized before being rendered in the widget, allowing a user with permission to create or edit taxonomy terms to inject scripts into the term name that execute when a form containing the widget is viewed.

Exploit affects versions 7.x-1.x up to and including 7.x-1.11.

Analysis

AI-generated

Technical impact

The Drupal 7 Term Reference Tree module contains two stored XSS vectors that allow an attacker to inject and execute arbitrary HTML or JavaScript whenever a field that uses the widget or formatter is rendered. The first vector exploits the lack of sanitization in token display templates when the Token module is enabled and an attacker controls token output such as a term description, while the second vector originates from unsanitized taxonomy term labels, permitting a user with permission to create or edit terms to embed scripts that execute when any form containing the widget is viewed. Both vectors are cross‑site scripting weaknesses (CWE‑79) that can compromise the confidentiality and integrity of a user's session without providing direct access to the server.

Affected Systems

Affected systems include deployments of Drupal 7 that employ the Term Reference Tree module at any 7.x‑1.x release through version 7.x‑1.11. The module is part of the Drupal ecosystem and is identified by the CNA as Drupal:Term Reference Tree. Administrators of sites that use this widget and allow token display templates or editing of taxonomy terms to be performed by ordinary users are most at risk.

Risk and Exploitability

The vulnerability has a CVSS score of 5.1, indicating moderate severity, and is not currently listed in CISA's KEV catalog. While an EPSS score is not available, the likelihood of exploitation cannot be quantified precisely; however, the attack requires only the ability to create or edit terms, a capability typically granted to many site editors. Exploitation can be achieved simply by inserting malicious markup into a term description or label, which renders unchanged when the widget is displayed. Once executed, the payload runs in the context of any user who views the affected page, potentially leading to session hijacking, defacement, or phishing attacks.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Term Reference Tree module to the latest available version that includes a fix for this issue (any release above 7.x‑1.11, if available).
  • Disable or remove the Token module's token display templates for fields that use the widget, or configure them to use strict sanitization so that no unsanitized token output can be stored.
  • Restrict permissions so that only trusted administrators can create or edit taxonomy terms and token display templates, effectively limiting the attack surface.

Generated by OpenCVE AI on May 21, 2026 at 23:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Taxonomy Term Reference Tree Widget Project
Taxonomy Term Reference Tree Widget Project taxonomy Term Reference Tree Widget
CPEs cpe:2.3:a:taxonomy_term_reference_tree_widget_project:taxonomy_term_reference_tree_widget:*:*:*:*:*:drupal:*:*
Vendors & Products Taxonomy Term Reference Tree Widget Project
Taxonomy Term Reference Tree Widget Project taxonomy Term Reference Tree Widget
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Drupal
Drupal term Reference Tree
Vendors & Products Drupal
Drupal term Reference Tree
Type Values Removed Values Added
Description In the Drupal 7 Term Reference Tree module, two stored XSS vectors exist in the widget/formatter rendering pipeline. Vector A (token display templates): When the Token module is enabled and token display templates are configured, attacker-controlled token output (e.g., term description) is rendered without proper sanitization. Any user who can edit the referenced taxonomy terms can inject HTML/JS that executes when the field is rendered. Vector B (term label rendering): Taxonomy term labels are not properly sanitized before being rendered in the widget, allowing a user with permission to create or edit taxonomy terms to inject scripts into the term name that execute when a form containing the widget is viewed. Exploit affects versions 7.x-1.x up to and including 7.x-1.11.
Title Stored XSS in Drupal 7 Term Reference Tree module (token display templates and term labels)
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
drupal
Published
Updated
May 22, 2026, 1:24 PM
Reserved
Mar 12, 2026, 10:40 PM
Status
Analyzed
Published
May 21, 2026, 10:16 PM
Modified
Jul 23, 2026, 4:10 PM