<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Nodemailer &lt;= 9.0.0 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/nodemailer--9.0.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 18 Jun 2026 14:54:24 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/nodemailer--9.0.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>Nodemailer: Message-level raw option bypasses disableFileAccess/disableUrlAccess, enabling arbitrary file read and full-response SSRF</title><link>https://feed.craftedsignal.io/briefs/2026-06-nodemailer-raw-bypass/</link><pubDate>Thu, 18 Jun 2026 14:54:24 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-nodemailer-raw-bypass/</guid><description>Nodemailer versions up to 9.0.0 are vulnerable to arbitrary local file read and full-response Server-Side Request Forgery (SSRF) when handling untrusted input for the message-level `raw` option, bypassing intended security flags and allowing sensitive content to be exfiltrated via an attacker-controlled recipient.</description><content:encoded><![CDATA[<p>A critical vulnerability exists in Nodemailer versions up to 9.0.0, where the message-level <code>raw</code> option can bypass the <code>disableFileAccess</code> and <code>disableUrlAccess</code> sandboxing flags. This flaw allows an attacker to achieve arbitrary local file disclosure and full-response Server-Side Request Forgery (SSRF). When an application, designed to sandbox untrusted input, calls <code>transporter.sendMail()</code> with the <code>raw</code> option influenced by an attacker, the <code>MailComposer.compile()</code> function fails to propagate these flags to the root MIME node. Consequently, the Nodemailer process will read local files (e.g., <code>/etc/passwd</code>) or fetch internal/external URLs (e.g., <code>http://169.254.169.254/</code>) and send their contents directly as the email message. This results in the exfiltration of sensitive server-side data to an attacker-specified email address, presenting a high risk to data confidentiality.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An application configured to use Nodemailer with <code>disableFileAccess</code> and/or <code>disableUrlAccess</code> for sandboxing processes untrusted user input.</li>
<li>An attacker crafts malicious input for the <code>transporter.sendMail()</code> call, specifically targeting the <code>raw</code> message option.</li>
<li>The attacker's input includes a malicious path (e.g., <code>raw: { path: '/etc/passwd' }</code>) or a malicious URL (e.g., <code>raw: { href: 'http://169.254.169.254/latest/meta-data/' }</code>).</li>
<li>Nodemailer's <code>MailComposer.compile()</code> function creates the root MIME node for the <code>raw</code> message without correctly applying the <code>disableFileAccess</code>/<code>disableUrlAccess</code> flags.</li>
<li>The <code>MimeNode</code> constructor initializes these flags to <code>false</code> by default, effectively ignoring the application's intended sandboxing.</li>
<li>During message compilation, <code>setRaw()</code> calls <code>_getStream()</code>, which proceeds to read the specified local file or fetch the specified URL, as the security flags are inactive.</li>
<li>The entire content of the read file or the fetched HTTP response body becomes the actual message content of the email.</li>
<li>Nodemailer's transport mechanisms deliver this crafted email, containing sensitive server data, to an email address specified by the attacker (e.g., <code>attacker@evil.test</code>).</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The primary impact of this vulnerability is a high compromise of data confidentiality. Attackers can exfiltrate arbitrary local files from the server, such as <code>/etc/passwd</code>, <code>/proc/self/environ</code>, application <code>.env</code> files, or key material. Additionally, the full-response SSRF capability allows attackers to query internal network services or cloud metadata endpoints (e.g., <code>169.254.169.254</code>) and retrieve their full responses. This sensitive information is then delivered directly to an attacker-controlled mailbox, making internal data accessible to external adversaries. The vulnerability directly subverts security controls put in place by the application, rendering them ineffective for the <code>raw</code> message type.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Patch:</strong> Immediately update Nodemailer to a patched version once available. Monitor the official Nodemailer repository and npm for security releases addressing GHSA-p6gq-j5cr-w38f.</li>
<li><strong>Application-level mitigation:</strong> Review all code paths that use <code>transporter.sendMail()</code> with the <code>raw</code> option. Ensure that untrusted user input cannot directly influence the <code>path</code> or <code>href</code> properties within the <code>raw</code> object. Implement strict input validation and sanitization.</li>
<li><strong>Deployment:</strong> Deploy the provided Sigma rules to your SIEM/EDR to detect attempts at SSRF and suspicious file access by Node.js processes on Linux hosts.</li>
<li><strong>Logging:</strong> Ensure comprehensive logging for process activity, file access, and network connections on servers hosting Node.js applications, particularly on Linux systems, to facilitate detection and investigation.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssrf</category><category>file-read</category><category>nodemailer</category><category>nodejs</category><category>javascript</category><category>supply-chain</category></item></channel></rss>