Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

postal-mime: Quadratic CPU consumption when decoding a header of many joinable RFC 2047 base64 encoded wordsGHSA-f2hq-32vh-53cc

HIGHFix: postalsys/postal-mime@9eb25a6

GHSA-f2hq-32vh-53cc is a high-severity (CVSS 7.5) vulnerability in postal-mime. A fix is available for postal-mime — see the affected versions and patch details below.

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

141other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
postal-mimenpm
8.3Mdownloads / week

Description

Impact

Decoding a header that holds a long run of joinable RFC 2047 base64 encoded words, such as =?utf-8?B?QUJD?= repeated tens of thousands of times in a Subject, From, To, a filename or a description, took time quadratic in the number of words. The join check ran a regex over the text joined so far for every word, which flattens the accumulated string each time. A single well formed message of about 1.6 MB blocked the event loop for one to twenty seconds depending on the host, and inline message/rfc822 parts multiplied the cost, since each nested message carried its own header budget.

Any application that parses untrusted mail with postal-mime 3.0.0 through 4.0.7, including the exported decodeWords() helper, is affected. There is no confidentiality or integrity impact.

Patches

Fixed in 4.0.8. The pad check now tracks the last appended word instead of testing the joined text, so decoding is linear in the header length. The same release also counts the parts and header bytes of inline message/rfc822 sub-messages against the limits of the message as a whole, counts every header line for at least 64 bytes of maxHeadersSize, and adds a scaling test that measures every stage of the parser at two input sizes.

Workarounds

Lower maxHeadersSize from its 2 MiB default to bound the cost per message, or parse untrusted mail in a worker that can be terminated.

Credits

Reported by Felipe Fernández.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmpostal-mime≥ 3.0.0&&< 4.0.84.0.8npm install postal-mime@4.0.8

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for postal-mime, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update postal-mime to 4.0.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-f2hq-32vh-53cc is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Impact Decoding a header that holds a long run of joinable RFC 2047 base64 encoded words, such as `=?utf-8?B?QUJD?=` repeated tens of thousands of times in a `Subject`, `From`, `To`, a filename or a description, took time quadratic in the number of words. The join check ran a regex over the text joined so far for every word, which flattens the accumulated string each time. A single well formed message of about 1.6 MB blocked the event loop for one to twenty seconds depending on the host, and inline `message/rfc822` parts multiplied the cost, since each nested message carried its own heade
O3 Security · Impact-Aware SCA

Is GHSA-f2hq-32vh-53cc in your dependencies?

Find it across npm, including transitive dependencies.

postal-mime: Quadratic CPU consumption when…