Skip to content

v3.15.1

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Nov 07:39
a9b4079

3.15.1 (2026-11-30)

Summary

A security fix for the HTML to text conversion. Crafted HTML could get past the nesting depth check and keep the event loop busy for seconds per message.

Who should upgrade

  • Everyone who parses untrusted mail with the default options. An HTML part of alternating unclosed tags such as <li><p> was not counted as nested, and converting it to text took time that grows with the square of its size (1.8 s for a 410 KB message).
  • Not affected if you parse with skipHtmlToText: true.

Highlights

  • The nesting depth of an HTML part is now counted by htmlparser2, the same parser that does the conversion, so the check and the conversion can not disagree. Such a message is refused in milliseconds: its text is empty, textConversionError is set, and the HTML, headers and attachments are returned as before. Thanks to Yeonghun Kim of Theori, with Xint, for the report.
  • nodemailer updated to 10.6.2.

Bug Fixes

  • count HTML nesting depth with the parser that builds the document (9b029e9)
  • update dependencies (88cce43)