postal-mime: Quadratic CPU consumption when decoding a header of many joinable RFC 2047 base64 encoded words
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (postal-mime 4.0.8), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
npm postal-mime
- Affected
- >= 3.0.0, < 4.0.8
- Fixed in
- 4.0.8
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-f2hq-32vh-53cc lists affected ranges: npm postal-mime >=3.0.0 <4.0.8
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-f2hq-32vh-53cc lists affected ranges: npm postal-mime >=3.0.0 <4.0.8 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
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…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 3 · amended ·
Amended from ghsa record GHSA-f2hq-32vh-53cc
- Revision 2 · amended ·
Amended from osv record GHSA-f2hq-32vh-53cc
- Revision 1 · created ·
Published from ghsa record GHSA-f2hq-32vh-53cc
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-f2hq-32vh-53cc Advisory: postal-mime: Quadratic CPU consumption when decoding a header of many joinable RFC 2047 base64 encoded words IDs: GHSA-f2hq-32vh-53cc Record: https://patchnext.com/advisories/ghsa-f2hq-32vh-53cc (revision 3, source checked 26 Oct 2026, 13:07 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.5) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: postal-mime 4.0.8. A vendor fix does not mean a deployment is fixed. ## Affected components - npm postal-mime: affected >= 3.0.0, < 4.0.8; fixed in 4.0.8 ## Suggested inspection (read-only) - `npm ls postal-mime --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on postal-mime. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-f2hq-32vh-53cc (GitHub-reviewed advisory GHSA-f2hq-32vh-53cc lists affected ranges: npm postal-mime >=3.0.0 <4.0.8) - Verified: https://osv.dev/vulnerability/GHSA-f2hq-32vh-53cc (OSV record GHSA-f2hq-32vh-53cc lists affected ranges: npm postal-mime >=3.0.0 <4.0.8 (fixed)) Commands are suggestions: review each one before running it.
Loading voting…