GitHub Advisoryadvisory · npm

GHSA-fv2f-rw9f-v9cm smtp-server's command parser memory exhaustion denial-of-service

HIGH Published 2026-05-15 Modified 2026-06-29 Official page ↗
Aliases
CVE-2026-38728
Ecosystem
npm
Packages
smtp-server
Severity
High
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Weaknesses
CWE-400
Reviewed
2026-06-29

Affected packages

• npm smtp-server: < 3.18.3 → fixed in 3.18.3

Description

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.

Related

Alias · CVE (1)

  • CVE-2026-38728 An issue in Nodemailer smtp_server before v.3.18.3 allows a remote attacker to cause a denial of service via the SMTPStream._write,… vulnerability

Weakness · CWE (1)

  • CWE-400 Uncontrolled Resource Consumption weakness

References