Intel

AIKIDO-2025-10871

postal-mime is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-rcmh-qjqh-p98v

30

Low Risk

This Affects:

JSpostal-mime
1.0.0 - 2.6.0
Fixed in 2.6.1

TL;DR

Affected versions of this package are vulnerable to a Denial of Service (DoS) attack caused by deeply nested address groups in email headers. A malicious header such as g0: g1: g2: ... gN: user@example.com; can trigger uncontrolled recursion in the address parser, eventually causing a stack overflow and crashing the application. The fix introduces a recursion-depth limit (MAX_NESTED_GROUP_DEPTH = 50), which safely aborts parsing when the structure becomes too deeply nested. This mirrors the mitigation previously applied to the Nodemailer address parser.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

postal-mime is vulnerable to Denial of Service (DoS) in versions 1.0.0 - 2.6.0.

How to fix this

Upgrade the postal-mime library to the patch version.