CVE-2026-38728: smtp-server's command parser memory exhaustion denial-of-service
smtp-server prior to v3.18.3 are vulnerable to unauthenticated memory exhaustion denial-of-service. smtp-server's command parser allows any remote client to consume server memory by sending data without newline characters. The server's remainder buffer in SMTPStream.write grows without limit, leading to heap exhaustion, prolonged GC pauses that freeze the event loop, and in some cases, process crash.
Published May 15, 2026 · Updated Jun 29, 2026
Affected packages
smtp-server
- Ecosystem
- npm
- Affected
- < 3.18.3
- Fixed in
- 3.18.3
- Check
npm ls smtp-server
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
smtp-server prior to v3.18.3 are vulnerable to unauthenticated memory exhaustion denial-of-service. smtp-server's command parser allows any remote client to consume server memory by sending data without newline characters. The server's _remainder buffer in SMTPStream._write grows without limit, leading to heap exhaustion, prolonged GC pauses that freeze the event loop, and in some cases, process crash.
The _write method in lib/smtp-stream.js appends incoming TCP chunks to this._remainder in command mode. The buffer is only emptied when a newline is found. If a client never sends a newline, the _remainder value will grow indefinitely, causing excess memory consumption.
Credited to blue2cat.
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-38728
- https://bytecreator.dev/blog/CVE-2026-38728
- https://github.com/nodemailer/smtp-server
- https://github.com/nodemailer/smtp-server/releases/tag/v3.18.3
- https://github.com/nodemailer/smtp-server/commit/592c5666fa0c76d1d04c1a32abad0ef806fbfe97
- https://github.com/advisories/GHSA-fv2f-rw9f-v9cm
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
