<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-30T13:23:34.263062+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-c7w3-x93f-qmm8</id>
    <title>GHSA-c7w3-x93f-qmm8 — Nodemailer has SMTP command injection due to unsanitized `envelope.size` parameter</title>
    <updated>2026-09-30T13:23:34.264383+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: nodemailer</p>
<p>### Summary
When a custom `envelope` object is passed to `sendMail()` with a `size` property containing CRLF characters (`\r\n`), the value is concatenated directly into the SMTP `MAIL FROM` command without sanitization. This allows injection of arbitrary SMTP commands, including `RCPT TO` — silently adding attacker-controlled recipients to outgoing emails.</p>
<p>### Details
In `lib/smtp-connection/index.js` (lines 1161-1162), the `envelope.size` value is concatenated into the SMTP `MAIL FROM` command without any CRLF sanitization:</p>
<p>```javascript
if (this._envelope.size &amp;&amp; this._supportedExtensions.includes('SIZE')) {
    args.push('SIZE=' + this._envelope.size);
}
```</p>
<p>This contrasts with other envelope parameters in the same function that ARE properly sanitized:
- **Addresses** (`from`, `to`): validated for `[\r\n&lt;&gt;]` at lines 1107-1127
- **DSN parameters** (`dsn.ret`, `dsn.envid`, `dsn.orcpt`): encoded via `encodeXText()` at lines 1167-1183</p>
<p>The `size` property reaches this code path through `MimeNode.setEnvelope()` in `lib/mime-node/index.js` (lines 854-858), which copies all non-standard envelope properties verbatim:</p>
<p>```javascript
const standardFields = ['to', 'cc', 'bcc', 'from'];
Object.keys(envelope).forEach(key =&gt; {
    if (!standardFields.includes(key)) {
        this._envelope[key] = envelope[key];
    }
});
```</p>
<p>Since `_sendCommand()` writes the command string followed by `\r\n` to the raw TCP socket, a CRLF in the `size` value terminates the `MAIL FROM` command and…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-c7w3-x93f-qmm8"/>
  </entry>
</feed>
