CVE-2026-137966 in ToolJet
Summary
by MITRE • 11/27/2026
ToolJet before 3.21.96-LTS contains an arbitrary file read and SSRF vulnerability in the SMTP plugin that allows authenticated app builders to pass object values to Nodemailer. Attackers can set textContent or htmlContent to path or href content objects to email server files or internal cloud metadata responses to themselves.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/27/2026
ToolJet versions prior to 3.21.96-LTS contain critical security flaws within its SMTP plugin that enable authenticated application builders to exploit improper input validation and object handling mechanisms. The vulnerability stems from the way the platform processes email content parameters, specifically textContent and htmlContent fields, which are passed directly to the Nodemailer library without sufficient sanitization or type checking. This architectural oversight allows an attacker who has obtained valid credentials for app building purposes to manipulate these parameters into accepting arbitrary object values rather than simple strings. By injecting structured objects containing file paths or hyperlinks instead of plain text content, the underlying mail sending mechanism is coerced into interpreting these inputs as resources to be fetched or read from the local filesystem or remote servers. This behavior deviates significantly from the intended design where email bodies should consist solely of textual data for display purposes, thereby creating a pathway for unauthorized data access and network interaction.
The exploitation of this vulnerability manifests in two distinct but related attack vectors: arbitrary file reading and Server-Side Request Forgery. In the context of arbitrary file read attacks, an adversary can configure the htmlContent or textContent fields to reference local system paths such as /etc/passwd on Linux-based systems or critical configuration files within the application environment. When the SMTP plugin attempts to process these inputs for sending emails, it inadvertently reads the contents of the specified files and includes them in the email payload sent to the attacker-controlled recipient address. This results in a direct leakage of sensitive server-side information, potentially exposing database credentials, API keys, internal network configurations, or other proprietary data stored on the host machine. The severity is compounded by the fact that this access requires only authenticated app builder status, which may be granted to developers with varying levels of security awareness within an organization.
Simultaneously, the vulnerability facilitates Server-Side Request Forgery attacks through the manipulation of href attributes within HTML content objects. By setting these fields to point towards internal cloud metadata endpoints or private network services that are not accessible from the public internet, attackers can force the ToolJet server to initiate HTTP requests on their behalf. This capability allows adversaries to probe internal infrastructure, identify running services, and potentially exfiltrate data from sensitive backend systems such as AWS instance metadata service version 2 (IMDSv2) or Kubernetes API servers. The ability to interact with these restricted resources effectively bypasses network segmentation controls designed to isolate the application tier from critical backend components, turning a standard email sending feature into a powerful reconnaissance and lateral movement tool within compromised environments.
From a classification perspective, this vulnerability aligns closely with CWE-94 Improper Control of Generation of Code (Code Injection) in its broader interpretation of untrusted data influencing system behavior, as well as CWE-284 Improper Access Control which reflects the exploitation of authenticated privileges to perform unauthorized actions. The SSRF component is directly mapped to ATT&CK technique T1557 Adversary-in-the-Middle or more specifically T1090 Proxy when used for pivoting, but primarily falls under T1608 Overtrust Server-Side Request Forgery in modern threat modeling frameworks. These classifications highlight the critical nature of trusting user-supplied data structures without rigorous validation and type enforcement, particularly when those inputs are processed by powerful libraries like Nodemailer that have broad system access capabilities.
To mitigate these risks, organizations running ToolJet must immediately upgrade to version 3.21.96-LTS or later where the SMTP plugin has been patched to enforce strict string typing for email content fields and sanitize object injections. In addition to upgrading, administrators should implement network-level controls such as egress filtering to restrict outbound connections from application servers to known internal metadata endpoints and sensitive backend services. Principle of least privilege should be applied by restricting app builder permissions to only those users who strictly require them, thereby reducing the attack surface for authenticated exploitation. Furthermore, deploying Web Application Firewalls with rules capable of detecting anomalous object structures in form submissions can provide an additional layer of defense against similar injection attempts across other modules within the platform until all instances are fully updated and hardened.