Advisory

GHSA-fv2f-rw9f-v9cm

Also known as: 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.

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-05-15 15:30 UTC
Modified
2026-06-29 23:26 UTC

Affected packages and fixes

smtp-server

npm · All systems

Affected

  • introduced 0, fixed 3.18.3 (semver)

Fixed versions

3.18.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences