Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodemailer/nodemailer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.0.11
Choose a base ref
...
head repository: nodemailer/nodemailer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.0.0
Choose a head ref
  • 3 commits
  • 17 files changed
  • 3 contributors

Commits on Jun 14, 2026

  1. fix!: validate TLS certificates by default when fetching remote content

    lib/fetch hardcoded rejectUnauthorized:false, so every HTTPS request —
    including remote attachment fetches that carry Authorization/API-key
    headers via attachment.httpHeaders — skipped certificate validation. A
    network-adjacent attacker could present any certificate (self-signed,
    expired, wrong host) and silently harvest those credentials.
    
    Validate certificates by default everywhere. Callers opt out explicitly
    with tls.rejectUnauthorized=false, and attachments can pass a per-message
    `tls` option for legitimate internal/self-signed hosts. Also harden two
    adjacent paths flagged while mapping the fetch flow:
    
    - strip Authorization/Cookie/Proxy-Authorization request headers when a
      redirect crosses to a different host or downgrades https->http
    - validate the HTTPS proxy CONNECT certificate by default, overridable
      via the transport tls options (e.g. self-signed proxy in tests)
    
    Refs: GHSA-55pm-vh62-rwjg
    
    BREAKING CHANGE: HTTPS requests made while fetching remote content
    (attachment href/path URLs, OAuth2 token endpoints, HTTP/HTTPS proxy
    CONNECT) now validate the server's TLS certificate by default. Requests
    to hosts with self-signed, expired, or hostname-mismatched certificates
    that previously succeeded will now fail. Opt back out per request with
    tls.rejectUnauthorized=false (transport options, or a per-attachment
    `tls` option).
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
    andris9 and claude committed Jun 14, 2026
    Configuration menu
    Copy the full SHA
    6a947ac View commit details
    Browse the repository at this point in the history
  2. fix: replace deprecated url.parse with a WHATWG URL wrapper

    lib/fetch, lib/mailer, lib/smtp-connection and lib/shared parsed URLs
    with the deprecated url.parse()/url.resolve() (Node DEP0169, whose
    "behavior is not standardized and prone to errors that have security
    implications"). Route them through a new lib/shared/url.js that prefers
    the WHATWG URL and normalizes results back to the legacy field names, so
    every call site stays unchanged.
    
    Normalizing WHATWG output back to the legacy shape also fixes four
    regressions the raw WHATWG parser would otherwise introduce into the
    same remote-content / connection paths hardened in GHSA-55pm-vh62-rwjg:
    
    - IPv6 literal hosts kept their brackets ('[::1]'), which net/dns/
      http.request treat as a DNS name -> ENOTFOUND. Strip them so fetch,
      the HTTP proxy client and SMTP connection URLs dial IPv6 again.
    - a password-only connection URL (smtps://:apikey@host) dropped the
      credential and connected unauthenticated; keep it.
    - non-ASCII hosts on non-special schemes (smtp:/smtps:/socks:) were
      percent-encoded instead of IDNA-mapped, so DNS failed; punycode them.
    - a host-less URL returned a null hostname that crashed Cookies.set;
      return '' as the legacy parser did.
    
    On Node < 6.13 (no WHATWG URL) and for input WHATWG rejects, the wrapper
    falls back to the legacy parser to preserve behavior.
    
    Refs: GHSA-55pm-vh62-rwjg
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
    andris9 and claude committed Jun 14, 2026
    Configuration menu
    Copy the full SHA
    0c080fb View commit details
    Browse the repository at this point in the history
  3. chore(master): release 9.0.0 (#1827)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Jun 14, 2026
    Configuration menu
    Copy the full SHA
    541f5fd View commit details
    Browse the repository at this point in the history
Loading