CVE-2026-126741 in Smart Trim
Summary
by MITRE • 11/26/2026
Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting") vulnerability in Drupal Smart Trim allows Stored XSS. This issue affects Smart Trim versions: from 0.0.0 to 2.2.2, from 2.3.0 to 2.3.2.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/26/2026
The identified security flaw represents a classic instance of improper neutralization of input during web page generation, commonly known as Cross-Site Scripting or XSS. Specifically, this vulnerability exists within the Drupal Smart Trim module and manifests as a Stored XSS issue rather than a reflected one. This distinction is critical because stored vulnerabilities persist on the target server, typically in a database, meaning that every user who views the affected content will be exposed to the malicious payload without requiring any specific interaction beyond normal page viewing. The vulnerability affects versions of the Smart Trim module ranging from 0.0.0 up through 2.3.2, encompassing both older legacy releases and more recent updates prior to the fixed version.
From a technical perspective, the root cause lies in the failure of the application to properly sanitize or encode user-supplied input before it is rendered within an HTML context. When content processed by Smart Trim contains special characters such as angle brackets, quotes, or ampersands that are not correctly escaped, these characters can be interpreted by the victim's web browser as executable JavaScript code rather than static text data. This allows an attacker to inject arbitrary scripts into pages managed by the module. Because the input is stored server-side, the malicious script executes automatically in the context of the vulnerable website whenever a user accesses the compromised content.
The operational impact of this vulnerability is severe due to its persistent nature and broad attack surface. An authenticated attacker with permission to create or edit content can embed malicious scripts that will execute for any visitor viewing that content. This enables session hijacking, where attackers steal authentication cookies to impersonate legitimate users, including administrators. It also facilitates keylogging, credential harvesting through fake login forms injected into the page, and defacement of the website's appearance. Furthermore, stored XSS is frequently leveraged as a vector for drive-by downloads or phishing attacks against site visitors who trust the domain hosting the content.
In terms of industry classification standards, this vulnerability aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting). The specific behavior of storing malicious data and executing it later corresponds to ATT&CK technique T1059.007, which covers JavaScript execution within a browser environment. Additionally, the persistence mechanism falls under MITRE ATT&CK tactic TA0003 Persistence, as the payload remains on the server until manually removed or overwritten.
To mitigate this risk, organizations running affected versions of Drupal Smart Trim must immediately upgrade to version 2.4.0 or later, where the input handling logic has been corrected to properly encode output data according to OWASP guidelines for preventing XSS attacks. Until an update is applied, administrators should implement strict Content Security Policy headers that restrict script execution sources and disable inline scripts if feasible within their specific deployment context. Regular security audits of contributed modules are also recommended to ensure that third-party extensions do not introduce similar input validation weaknesses into the Drupal ecosystem.