Skip to content

chore(deps): bump nodemailer minimum version to 8.0.5#16501

Closed
abarani wants to merge 1 commit into
payloadcms:3.xfrom
vubai:bump-nodemailer-805
Closed

chore(deps): bump nodemailer minimum version to 8.0.5#16501
abarani wants to merge 1 commit into
payloadcms:3.xfrom
vubai:bump-nodemailer-805

Conversation

@abarani
Copy link
Copy Markdown

@abarani abarani commented May 6, 2026

What?

Bump nodemailer minimum version to v8.0.5. Also bump the related @types/nodemailer to v8.0.0.
Version range has been set to ^8.0.5 and ^8.0.0 respectively to allow more recent versions.

Versions in repository lock file has been updated to v8.0.7 and v8.0.0 respectively, the @aws-sdk/client-sesv2 transitive dependency has been removed as @types/nodemailer doesn't depend on it anymore.

No code changes required.

Why?

This fixes two known vulnerabilities:

@abarani abarani changed the base branch from main to 3.x May 6, 2026 10:37
@abarani abarani force-pushed the bump-nodemailer-805 branch from 1b4c6c4 to b7ef353 Compare May 6, 2026 10:42
@abarani

This comment was marked as resolved.

@abarani abarani force-pushed the bump-nodemailer-805 branch from b7ef353 to 3e237c8 Compare May 6, 2026 10:58
@abarani abarani force-pushed the bump-nodemailer-805 branch from 3e237c8 to 5b0afdf Compare May 11, 2026 10:14
@abarani
Copy link
Copy Markdown
Author

abarani commented May 11, 2026

Someone willing to review this?

@jacobsfletch
Copy link
Copy Markdown
Member

@abarani in nodemailer v8, they widened Mail.Options['from']. Our SendEmailOptions aliases that directly, so existing user code typed against the old shape would break if we blindly bump versions — hence the CI failure here.

Couldn't push to your fork (maintainer edits not enabled), so I carried your commits over to a new branch: #16664.

I've added a normalization shim there to keep it non-breaking. We narrow the type back down to its v7 shape, then add a runtime transform.

jacobsfletch added a commit that referenced this pull request May 18, 2026
Supersedes #16501.

Related: #16651.

Bumps `nodemailer` to `^8.0.5` and `@types/nodemailer` to `^8.0.0`
throughout the monorepo.

The `nodemailer@7.0.12` package has known advisories that are fixed in
>= 8.0.5.
- GHSA-vvjj-xcjg-gr5g
- GHSA-c7w3-x93f-qmm8

Note: `nodemailer` v8 widened the `Mail.Options['from']` type to also
accept an array. This is considered a breaking change in Payload's
`SendEmailOptions` type, if a project code relies on the previous shape.

For backwards compatibility, we pin `SendEmailOptions['from']` back to
v7's `string | Address` shape, then normalize this at runtime, so email
adapters and consumer code stay source-compatible.

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1214892618463672

---------

Co-authored-by: Andrea Barani <andrea.barani@vubai.com>
@abarani
Copy link
Copy Markdown
Author

abarani commented May 19, 2026

@jacobsfletch Great, thank you for taking your time on this! I completely missed the type changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: @payloadcms/email-nodemailer pins vulnerable nodemailer@7.0.12 (GHSA-vvjj-xcjg-gr5g, GHSA-c7w3-x93f-qmm8) — see PR #16501

2 participants