nodemailer 10.1.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/SECURITY.md +105 -29
- package/dist/cjs/fetch/index.js +16 -10
- package/dist/cjs/package-info.d.ts +1 -1
- package/dist/cjs/package-info.js +1 -1
- package/dist/esm/fetch/index.js +16 -10
- package/dist/esm/package-info.d.ts +1 -1
- package/dist/esm/package-info.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [10.1.1](https://github.com/nodemailer/nodemailer/compare/v10.1.0...v10.1.1) (2026-10-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **fetch:** strip credentials on any cross-origin redirect ([a15360c](https://github.com/nodemailer/nodemailer/commit/a15360cd2cd12e4670e96ab0b7290e8c862391cf))
|
|
9
|
+
|
|
3
10
|
## [10.1.0](https://github.com/nodemailer/nodemailer/compare/v10.0.16...v10.1.0) (2026-10-10)
|
|
4
11
|
|
|
5
12
|
|
package/SECURITY.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Security Policy
|
|
2
2
|
|
|
3
|
-
Nodemailer is a widely deployed, zero-dependency
|
|
4
|
-
reports
|
|
3
|
+
Nodemailer is a widely deployed, zero-dependency email library. We welcome
|
|
4
|
+
responsible reports of vulnerabilities that present a credible security risk to
|
|
5
|
+
users. Please distinguish security vulnerabilities from ordinary bugs, unusual
|
|
6
|
+
edge cases, and hardening suggestions.
|
|
5
7
|
|
|
6
8
|
## Supported Versions
|
|
7
9
|
|
|
@@ -17,45 +19,119 @@ the supported way to receive security updates.
|
|
|
17
19
|
If you are on an older major, please upgrade. See the migration notes at
|
|
18
20
|
<https://nodemailer.com/> before updating.
|
|
19
21
|
|
|
20
|
-
##
|
|
22
|
+
## What Qualifies as a Security Vulnerability
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
A security report should identify a realistic way for an attacker to cross a
|
|
25
|
+
security boundary in a supported version of Nodemailer. Unexpected behavior,
|
|
26
|
+
a failing test, or a technically correct proof of concept is not sufficient on
|
|
27
|
+
its own to establish security impact.
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
In particular, explain:
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
- **Attacker capabilities:** Who is the attacker, and what inputs, systems, or
|
|
32
|
+
responses can they control _without_ already having the privileges or secrets
|
|
33
|
+
they are trying to gain?
|
|
34
|
+
- **Attack path:** How does attacker-controlled input reach the affected code
|
|
35
|
+
through a supported Nodemailer API or a realistic application integration?
|
|
36
|
+
- **Prerequisites:** What configuration and user actions are required? If the
|
|
37
|
+
attack depends on unusual options or deliberately malformed input, explain
|
|
38
|
+
why those conditions could arise in a real application.
|
|
39
|
+
- **Impact:** What confidentiality, integrity, or availability boundary is
|
|
40
|
+
crossed, and what can the attacker achieve as a result?
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
A vulnerability involving an optional or less common feature can still qualify
|
|
43
|
+
if these conditions are met. Conversely, the existence of a defensive check in
|
|
44
|
+
the code does not, by itself, establish that every bypass of that check has a
|
|
45
|
+
realistic security impact.
|
|
34
46
|
|
|
35
|
-
|
|
36
|
-
- The component involved (e.g. SMTP connection, address parsing, MIME/header
|
|
37
|
-
generation, DKIM).
|
|
38
|
-
- A clear description of the issue and its impact (e.g. header/SMTP command
|
|
39
|
-
injection, information disclosure, DoS).
|
|
40
|
-
- A minimal proof of concept or reproduction steps.
|
|
41
|
-
- Any suggested remediation, if you have one.
|
|
47
|
+
## Reporting a Vulnerability
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Accepted issues are fixed in a new release and coordinated through a GitHub
|
|
46
|
-
Security Advisory, and reporters who wish to be named are credited.
|
|
49
|
+
**Do not disclose suspected exploitable vulnerabilities through public GitHub
|
|
50
|
+
issues, pull requests, or discussions before coordinating with the maintainer.**
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
Report privately through one of the following channels:
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
1. **GitHub Security Advisories (preferred):**
|
|
55
|
+
<https://github.com/nodemailer/nodemailer/security/advisories/new>.
|
|
56
|
+
2. **Email:** **andris@reinman.eu**, as listed in
|
|
57
|
+
[`SECURITY.txt`](SECURITY.txt). Encrypt sensitive details if possible.
|
|
58
|
+
|
|
59
|
+
### Required Information
|
|
60
|
+
|
|
61
|
+
Please provide enough information to evaluate both the defect and its security
|
|
62
|
+
impact. Reports should include:
|
|
63
|
+
|
|
64
|
+
1. The affected Nodemailer version or commit, Node.js version, and relevant
|
|
65
|
+
configuration.
|
|
66
|
+
2. A concise description of the issue and the affected public API or code path.
|
|
67
|
+
3. A minimal, tested reproduction, including steps to run it, expected behavior,
|
|
68
|
+
and observed behavior.
|
|
69
|
+
4. A concrete threat model: attacker control, prerequisites, trust boundary, and
|
|
70
|
+
resulting impact. Clearly distinguish what your reproduction proves from what
|
|
71
|
+
you believe might be possible.
|
|
72
|
+
5. An explanation of why the issue affects applications beyond a deliberately
|
|
73
|
+
constructed test setup, where this is not obvious.
|
|
74
|
+
|
|
75
|
+
A suggested fix is welcome but does not replace an explanation of exploitability.
|
|
76
|
+
A complete real-world exploit is not always necessary, but the report must make
|
|
77
|
+
a credible security impact clear.
|
|
78
|
+
|
|
79
|
+
### Reports That May Be Treated as Ordinary Bugs
|
|
80
|
+
|
|
81
|
+
The following generally do **not** qualify for private security handling unless
|
|
82
|
+
you can demonstrate an additional, meaningful security boundary crossing:
|
|
83
|
+
|
|
84
|
+
- Issues that require the attacker to control trusted application code,
|
|
85
|
+
administrator-only configuration, or the secret they supposedly extract.
|
|
86
|
+
- Problems caused solely by application-level misuse, exposed credentials, or
|
|
87
|
+
insecure deployment choices outside Nodemailer's control.
|
|
88
|
+
- Contrived proof-of-concept setups where the tester controls both sides of a
|
|
89
|
+
request, without explaining how a separate attacker could trigger the issue.
|
|
90
|
+
- Parser quirks, unexpected behavior, and bypasses of internal checks with no
|
|
91
|
+
demonstrated security impact.
|
|
92
|
+
- Speculative findings based only on static analysis or an automated tool's
|
|
93
|
+
assessment, without a verified reproduction and credible attack scenario.
|
|
94
|
+
|
|
95
|
+
These may still be valid bugs and may be considered through the normal issue
|
|
96
|
+
tracker. Please coordinate before making any potentially exploitable details
|
|
97
|
+
public. Classification as a bug does not guarantee a fix or a particular
|
|
98
|
+
priority.
|
|
99
|
+
|
|
100
|
+
### Automated and AI-Assisted Reports
|
|
101
|
+
|
|
102
|
+
Automated analysis and AI tools are welcome as research aids, but the person
|
|
103
|
+
submitting a report is responsible for verifying its claims. **Do not submit
|
|
104
|
+
bulk, unverified, or speculative AI-generated findings.** Test each finding
|
|
105
|
+
against a supported release and establish the actual security impact. Reports
|
|
106
|
+
that do not meet the requirements above may be closed without further
|
|
107
|
+
investigation or individual feedback; they can be resubmitted with stronger
|
|
108
|
+
evidence.
|
|
109
|
+
|
|
110
|
+
## Triage and Disclosure
|
|
111
|
+
|
|
112
|
+
Nodemailer is maintained by a single person, and there is **no guaranteed
|
|
113
|
+
response or resolution time**. Reports are prioritized based on demonstrated
|
|
114
|
+
impact, exploitability, affected usage, and available maintenance resources.
|
|
115
|
+
|
|
116
|
+
A private report does not automatically become a security advisory. Confirmed
|
|
117
|
+
vulnerabilities may be fixed and disclosed through GitHub Security Advisories;
|
|
118
|
+
other findings may be closed, deferred, or handled as ordinary bugs. Please do
|
|
119
|
+
not disclose details of an unresolved, potentially exploitable issue publicly
|
|
120
|
+
without coordinating with the maintainer.
|
|
121
|
+
|
|
122
|
+
## CVEs and Credit
|
|
123
|
+
|
|
124
|
+
We do not request or manage CVE identifiers. A report being acknowledged, a bug
|
|
125
|
+
being fixed, or a pull request being merged does **not** mean that Nodemailer
|
|
126
|
+
has confirmed a security vulnerability or endorsed a CVE assignment. We do not
|
|
127
|
+
guarantee advisories, CVE identifiers, or public credit for reports. For
|
|
128
|
+
confirmed vulnerabilities disclosed through an advisory, substantive reporters
|
|
129
|
+
may be credited if they wish.
|
|
54
130
|
|
|
55
131
|
## Scope
|
|
56
132
|
|
|
57
133
|
In scope: the `nodemailer` package source in this repository: message and MIME
|
|
58
|
-
generation, SMTP/LMTP client
|
|
134
|
+
generation, SMTP/LMTP client behavior, address parsing, header handling, DKIM
|
|
59
135
|
signing, and the bundled transports.
|
|
60
136
|
|
|
61
137
|
Out of scope: vulnerabilities in your own application code, misconfiguration of
|
package/dist/cjs/fetch/index.js
CHANGED
|
@@ -116,6 +116,10 @@ function parseFetchUrl(url) {
|
|
|
116
116
|
}
|
|
117
117
|
return parsed;
|
|
118
118
|
}
|
|
119
|
+
// the port a request to the URL goes to, explicit or the default of its scheme
|
|
120
|
+
function fetchPort(parsed) {
|
|
121
|
+
return parsed.port ? Number(parsed.port) : parsed.protocol === 'https:' ? 443 : 80;
|
|
122
|
+
}
|
|
119
123
|
function nmfetch(url, options) {
|
|
120
124
|
options = options || {};
|
|
121
125
|
options.fetchRes = options.fetchRes || new node_stream_1.PassThrough();
|
|
@@ -232,7 +236,7 @@ function nmfetch(url, options) {
|
|
|
232
236
|
method,
|
|
233
237
|
host: parsed.hostname,
|
|
234
238
|
path: parsed.path,
|
|
235
|
-
port: parsed
|
|
239
|
+
port: fetchPort(parsed),
|
|
236
240
|
headers,
|
|
237
241
|
// Validate TLS certificates by default. Callers that genuinely need to
|
|
238
242
|
// reach a self-signed/internal host opt out explicitly with
|
|
@@ -334,17 +338,19 @@ function nmfetch(url, options) {
|
|
|
334
338
|
// the shared fetchRes once it times out. Callers listen with req.once().
|
|
335
339
|
return fail(new Error('Unsupported protocol for URL ' + redirectUrl), redirectUrl);
|
|
336
340
|
}
|
|
337
|
-
// Do not forward credentials when the redirect leaves the
|
|
338
|
-
//
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
//
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
341
|
+
// Do not forward credentials when the redirect leaves the origin: a different
|
|
342
|
+
// scheme, host or port is a different security context (an https to http
|
|
343
|
+
// downgrade would also put them on the wire in cleartext). Strip sensitive
|
|
344
|
+
// request headers so an attacker who controls the redirect target cannot
|
|
345
|
+
// harvest them.
|
|
346
|
+
const crossOrigin = redirectParsed.protocol !== parsed.protocol ||
|
|
347
|
+
redirectParsed.hostname !== parsed.hostname ||
|
|
348
|
+
fetchPort(redirectParsed) !== fetchPort(parsed);
|
|
349
|
+
if (options.headers && crossOrigin) {
|
|
345
350
|
const sensitive = ['authorization', 'cookie', 'proxy-authorization'];
|
|
346
351
|
Object.keys(options.headers).forEach(key => {
|
|
347
|
-
|
|
352
|
+
// normalized the way the request headers are built above, a padded name is sent too
|
|
353
|
+
if (sensitive.includes(key.toLowerCase().trim())) {
|
|
348
354
|
delete options.headers[key];
|
|
349
355
|
}
|
|
350
356
|
});
|
package/dist/cjs/package-info.js
CHANGED
package/dist/esm/fetch/index.js
CHANGED
|
@@ -78,6 +78,10 @@ function parseFetchUrl(url) {
|
|
|
78
78
|
}
|
|
79
79
|
return parsed;
|
|
80
80
|
}
|
|
81
|
+
// the port a request to the URL goes to, explicit or the default of its scheme
|
|
82
|
+
function fetchPort(parsed) {
|
|
83
|
+
return parsed.port ? Number(parsed.port) : parsed.protocol === 'https:' ? 443 : 80;
|
|
84
|
+
}
|
|
81
85
|
function nmfetch(url, options) {
|
|
82
86
|
options = options || {};
|
|
83
87
|
options.fetchRes = options.fetchRes || new PassThrough();
|
|
@@ -194,7 +198,7 @@ function nmfetch(url, options) {
|
|
|
194
198
|
method,
|
|
195
199
|
host: parsed.hostname,
|
|
196
200
|
path: parsed.path,
|
|
197
|
-
port: parsed
|
|
201
|
+
port: fetchPort(parsed),
|
|
198
202
|
headers,
|
|
199
203
|
// Validate TLS certificates by default. Callers that genuinely need to
|
|
200
204
|
// reach a self-signed/internal host opt out explicitly with
|
|
@@ -296,17 +300,19 @@ function nmfetch(url, options) {
|
|
|
296
300
|
// the shared fetchRes once it times out. Callers listen with req.once().
|
|
297
301
|
return fail(new Error('Unsupported protocol for URL ' + redirectUrl), redirectUrl);
|
|
298
302
|
}
|
|
299
|
-
// Do not forward credentials when the redirect leaves the
|
|
300
|
-
//
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
// Do not forward credentials when the redirect leaves the origin: a different
|
|
304
|
+
// scheme, host or port is a different security context (an https to http
|
|
305
|
+
// downgrade would also put them on the wire in cleartext). Strip sensitive
|
|
306
|
+
// request headers so an attacker who controls the redirect target cannot
|
|
307
|
+
// harvest them.
|
|
308
|
+
const crossOrigin = redirectParsed.protocol !== parsed.protocol ||
|
|
309
|
+
redirectParsed.hostname !== parsed.hostname ||
|
|
310
|
+
fetchPort(redirectParsed) !== fetchPort(parsed);
|
|
311
|
+
if (options.headers && crossOrigin) {
|
|
307
312
|
const sensitive = ['authorization', 'cookie', 'proxy-authorization'];
|
|
308
313
|
Object.keys(options.headers).forEach(key => {
|
|
309
|
-
|
|
314
|
+
// normalized the way the request headers are built above, a padded name is sent too
|
|
315
|
+
if (sensitive.includes(key.toLowerCase().trim())) {
|
|
310
316
|
delete options.headers[key];
|
|
311
317
|
}
|
|
312
318
|
});
|
package/dist/esm/package-info.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodemailer",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.1",
|
|
4
4
|
"description": "Easy as cake e-mail sending from your Node.js applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/nodemailer.js",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"homepage": "https://nodemailer.com/",
|
|
153
153
|
"devDependencies": {
|
|
154
|
-
"@aws-sdk/client-sesv2": "3.
|
|
154
|
+
"@aws-sdk/client-sesv2": "3.1151.0",
|
|
155
155
|
"@types/node": "20.19.43",
|
|
156
156
|
"bunyan": "1.8.15",
|
|
157
157
|
"c8": "12.0.0",
|
|
@@ -161,14 +161,14 @@
|
|
|
161
161
|
"libbase64": "1.3.2",
|
|
162
162
|
"libmime": "5.4.7",
|
|
163
163
|
"libqp": "2.1.2",
|
|
164
|
-
"mailauth": "7.
|
|
165
|
-
"prettier": "3.9.
|
|
164
|
+
"mailauth": "7.3.0",
|
|
165
|
+
"prettier": "3.9.10",
|
|
166
166
|
"proxy": "1.0.2",
|
|
167
167
|
"proxy-test-server": "1.0.0",
|
|
168
|
-
"smtp-server": "3.19.
|
|
168
|
+
"smtp-server": "3.19.21",
|
|
169
169
|
"tsx": "4.23.15",
|
|
170
170
|
"typescript": "6.0.3",
|
|
171
|
-
"typescript-eslint": "8.71.
|
|
171
|
+
"typescript-eslint": "8.71.2"
|
|
172
172
|
},
|
|
173
173
|
"engines": {
|
|
174
174
|
"node": ">=20.0.0"
|