Vulnerabilities in pkg:npm/smtp-server

PACKAGE
Advisory Identifier: GHSA-fv2f-rw9f-v9cm
Advisory Summary

CVE-2026-38728 is a HIGH smtp-server's command parser memory exhaustion vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Smtp server libraries in the npm ecosystem. The issue involves smtp-server's command parser memory exhaustion denial-of-service. Remediation is available by upgrading affected packages to version 3.18.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/smtp-server

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/smtp-server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-fv2f-rw9f-v9cm CVE-2026-38728 HIGH smtp-server's command parser memory exhaustion denial-of-service

CVE-2026-38728 at a Glance

CVE Identifier CVE-2026-38728
GHSA Identifier GHSA-fv2f-rw9f-v9cm
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Smtp server
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-38728

To remediate this vulnerability, upgrade all affected Smtp server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

smtp-server fixed: 3.18.3
npm install smtp-server@3.18.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls smtp-server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-38728, inspect your project dependencies using npm:

npm ls smtp-server

Analyze the terminal output to locate any version of Smtp server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.18.3), your application is affected.

Note: The npm ls smtp-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Smtp server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-38728 Affected Smtp server Versions

1 component(s)
Fixed Versions:
3.18.3
Product / Package Ecosystem Affected Versions Fixed Version
smtp-server
npm
< 3.18.3
3.18.3

References

Frequently Asked Questions

What is CVE-2026-38728?
CVE-2026-38728 is a security vulnerability in Smtp server involving smtp-server's command parser memory exhaustion denial-of-service under CWE-400: Uncontrolled Resource Consumption.
Which Smtp server versions are affected?
Affected versions include releases prior to 3.18.3 across affected packages: smtp-server.
What version fixes CVE-2026-38728?
Upgrading to 3.18.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is smtp-server affected?
Yes, smtp-server is affected in releases prior to 3.18.3. Upgrade your dependency to 3.18.3 or later.
What CWE is associated with CVE-2026-38728?
CVE-2026-38728 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-38728?
Run the dependency tree command: 'npm ls smtp-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fv2f-rw9f-v9cm",
  "modified" : "2026-06-29T22:57:15Z",
  "published" : "2026-05-15T15:30:45Z",
  "aliases" : [ "CVE-2026-38728" ],
  "summary" : "smtp-server's command parser memory exhaustion denial-of-service",
  "details" : "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.\n\nThe `_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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "smtp-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.18.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-38728"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodemailer/smtp-server/commit/592c5666fa0c76d1d04c1a32abad0ef806fbfe97"
  }, {
    "type" : "WEB",
    "url" : "https://bytecreator.dev/blog/CVE-2026-38728"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nodemailer/smtp-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodemailer/smtp-server/releases/tag/v3.18.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-29T22:57:15Z",
    "nvd_published_at" : "2026-05-15T15:16:51Z"
  }
}