Skip to content

Mail-parser differentials and sandbox-option drop

The September 17 GitHub wave ships a Nodemailer cluster that generalizes far beyond one npm package: two recipient-address parser differentials that defeat domain allow-lists by making the sender's parser disagree with the validator's parser, and a documented sandbox option silently dropped when content is resolved through the public plugin API.

Advisory Boundary Operator value
GHSA-8pjj-q6q6-qm29 / CVE-2026-92597 lib/addressparser mis-parses RFC 5322 comments: a comment closed immediately before a non-break character causes the atoms around the comment to concatenate, user@good-corp.com (x)evil.com reads as the single domain good-corp.comevil.com (attacker-registrable comevil.com) in both the SMTP envelope and the emitted headers, while a conformant parser terminates the domain at the comment (≥6.9.16, <9.1.0) Any app that validates the recipient with a strict parser and then hands the raw string to the delivery library crosses a validator/sender differential
GHSA-r7q5-h7cx-p54x / CVE-2026-92598 No UTS-46 normalization when encoding IDN domains: the resolver computes a different Punycode A-label than standards-compliant parsers, so invisible characters / compatibility mappings pass allow-list checks but deliver to attacker-controlled domains (<9.1.0) IDN variant classes (confusables, ignorable code points, compatibility mappings) are allow-list bypass payloads whenever validator and sender normalize differently
GHSA-5635-p6jj-6g9p / CVE-2026-92595 disableFileAccess/disableUrlAccess are not honored when message content is resolved via the legacy three-argument MailMessage.resolveContent(data, key, callback) signature: the missing options argument normalizes to {}, the message-level flags are discarded, and untrusted content reaches fs.createReadStream(path) or nmfetch(url) → arbitrary local file read / SSRF through plugin code (≤9.1.0, fixed 9.1.1) Sandbox flags set at object construction can be dropped by an alternate public entry point, enumerate every API that reaches the same sink and check which ones thread the security options
GHSA-v554-hhrr-96v5 / CVE-2026-92596 Quadratic-time addressparser input (tracked; DoS only) ,

Lab-only validation

Prove differentials against your own mail lab (disposable SMTP sink you own, e.g. a local server that records the actual RCPT TO). Registering an attacker-domain lookalike is only acceptable for your own bug-bounty scope labs. Never inject test recipients into real user mailflows.

Why this is durable: the validator/sender differential pattern

The two addressparser bugs are one class: the application's allow-list parser and the mail-sending library's parser disagree on where the domain ends. The defensive assumption "we validated the domain, so delivery goes to the validated domain" fails whenever the sender re-parses the raw string with different grammar.

  1. Comment-atom concatenation. Test matrix around RFC 5322 comment placement: (x)user@domain, user@(x)domain, user@dom(x)ain, and the shipped payload user@good-corp.com (x)evil.com. A conformant parser sees good-corp.com; the vulnerable parser sees a single concatenated label. The observable is which domain the delivery layer connects to, capture RCPT TO and the resolved MX on your own sink, not just the app's validation verdict.
  2. IDN normalization. Build a small corpus: zero-width joiners, U+00A8 vs U+0064 U+0069 diaeresis variants, full-width mappings, and a registered homograph lab domain. Submit through any address field feeding a mail or notification path. Evidence is a validation-accept/delivery-divergence decision table.
  3. Prefix/substring allow-lists first. The advisory notes naive startsWith('good-corp.com') checks fail on the concatenated form even without parser differences. Test both layers separately: does the validator catch it, and does the sender deliver it?
  4. This is the same family as the URL-parser differential findings on the Sept 15 Http4s/Traefik page and the Angular SSR trim-divergence page: two parsers, one string, security decision made by the wrong one. Generalize the audit to any validate-then-delegate pipeline (URL fetchers, git remotes, package specifiers, mail).

Sandbox-option drop via alternate entry point

The resolveContent bug is the reusable pattern for every library that advertises a sandbox:

  1. List every public function that reaches the guarded sink (file open, URL fetch, deserialization). Here transporter.sendMail() internal paths honored the flags; the public plugin API legacy signature did not.
  2. Read the option-threading code path: a missing argument normalized to an empty object is a silent security-option loss. Grep for options || {} / parameter-default collapse anywhere security flags travel.
  3. In a plugin-based mail app, identify which code resolves message content, attachment paths, hrefs, html fields from user input, and whether it goes through the affected signature. Proof is a synthetic path read of a lab marker file or an owned no-content callback hit, never a real secret file.

Reporting heuristics

  • Lead with the exact string where the parsers diverge plus the parsed-domain output of both parsers side by side; the pair is the whole finding.
  • Frame the impact honestly: delivery to an attacker-registrable domain requires the app's validation to gate a security decision (invite emails, verification links, invoice delivery). State which decision is bypassed; don't claim phishing success.
  • For the sandbox drop, name the entry point that bypasses the control and show the internal path that honors it, the differential, not the file read itself, is the vulnerability.

Tracked without publication

  • Quadratic-complexity addressparser DoS (GHSA-v554-hhrr-96v5) and joi isoDate() unanchored-regex ReDoS (GHSA-mrx9-2rrp-rhpx / CVE-2026-92599), availability-only, no reusable operator workflow beyond "cap input length," which the advisories already say.
  • TCH QRing BLE firmware item and quay-builder-qemu supply-chain note, hardware/scope-specific, tracked.
  • HKUDS nanobot < 0.3.0 WebFetchTool SSRF (GHSA-mpqf-rmwr-h7wr / CVE-2026-92576, _validate_url() doesn't block RFC1918/localhost/metadata ranges), tracked as another instance of the agent-fetch pattern already on the August 6 agent authority page; no new boundary beyond final-peer enforcement already documented there.
  • The n8n, Craft, and AVideo siblings of this wave live on their own pages (Craft wave, n8n page June-24 follow-up, AVideo page).

Source: hourly offensive-security scan, 2026-09-17 (00:31Z GitHub advisory wave). Tracked in the source index.

October 23 follow-up: three more addressparser grammar branches end constructs early, nesting, ; in quotes/comments, > in quoted local parts (Nodemailer 3.0.0-<10.1.4, GHSA-8c8m-p3m8-cjg8, GHSA-m943-m63m-w62w, GHSA-85x2-q946-cp5h)

The September 17 page's two allow-list-defeating differentials have now spawned three more legs of the identical shape, all fixed in 10.1.4: (1) nested comments, RFC 5322 comments nest, but the parser ended a comment at the first ) even inside a nest, so Victim (x(y) <evil@evil.com>) <v@victim.com> validates as v@victim.com through a conformant checker (Python's email._header_value_parser agrees) while Nodemailer RCPTs evil@evil.com, the same escaped-parenthesis shape fixed in 10.1.2, reached through nesting instead of quoted-pairs; (2) ; inside a quoted string or comment ends an address group early, turning display material into a routed recipient; (3) > inside a quoted local part ends the angle-addr early, delivering to a domain harvested from comment text. Each leg: a syntactically valid address a conformant parser approves with zero defects, misread only by the delivery parser.

  • Operator rules, unchanged core sharpened again: (1) recipient-authority differentials must be tested per grammar branch, not per bug class, one "comments/quotes handled wrong" fix produced three sibling regressions because the parser has separate early-termination branches (comment-depth, group-;, angle-addr->); build a canary battery that exercises every RFC 5322 construct boundary (nested comment depth 1-3, ;/:/</> inside quoted-string vs comment vs group, quoted-pair chains) and diff parsed-address output between the app's validator, the delivery library, and python -m email / a conformant reference. (2) The bidirectional framing matters: outbound = allow-list escape (mail to an approved domain lands at the attacker's), inbound = author disagreement between a DMARC/display layer on a conformant parser and a client on mailparser = sender spoofing setup. (3) Same-library re-advisory cadence (Sept 17 pair → 10.1.2 escape fix → this October trio) is a tell that a hand-written grammar parser is in play: when one address-parsing CVE lands on a target stack, sweep the construct battery immediately, more branches are always unfixed. Lab-bounded: your own SMTP sink with owned recipient domains; the PoC is a node -e parse-output diff, never real-user mail.

November 16 follow-up: mail-parser four-pack, the parsed output silently diverges from the message bytes and get_server_ipaddress() trusts sender-written Received material (CVE-2026-129299 / GHSA-24mq-4vc6-2prf, CVE-2026-129297 / GHSA-72px-j8gh-p79x, CVE-2026-129295 / GHSA-r7w7-vpq8-c5vv, CVE-2026-129296 / GHSA-fr3h-cpq2-9496, mail-parser < 4.6.2)

The outbound allow-list differentials on this page had an inbound mirror waiting: Python's mail-parser, a common component of sandbox detonation pipelines, phishing classifiers, and mail forensics tooling, shipped four defects in one wave, all fixed in 4.6.2, and two are durable evasion primitives.

  1. Silent header loss is an inspection-evasion primitive (CWE-436). Header names taken from the message were normalized before lookup: underscores folded to dashes and _json/_raw suffixes were interpreted, so a header literally named Subject_json was reported with the value of Subject (its own value discarded), any header whose name contains an underscore resolved to nothing, and one header's value could be replaced by another header's value, with has_defects staying false throughout. A scanner reading parsed output sees bytes that are not in the message. Related: email.message.Message.__len__ returns the header count, so a header-less message is falsy; parse() returned before initializing state and every property answered as an absent header, again with no defect flag. Test battery: submit messages with Subject_json, _json/_raw-suffixed names, underscore-bearing custom headers, and header-less bodies, then diff mail_parser output against the raw bytes and against python -m email. The finding is the divergence table, not the crash.
  2. Method-name collision puts bound methods in the parsed dict. Because header names resolved through Python attribute lookup, a 12-byte email with a header named Parse, Message, From_Bytes, or any of nine confirmed method names produced a bound-method object in mail_json, an uncaught TypeError outside the MailParser* hierarchy, killing workers that catch only library exceptions. Same-shape audit rule for any Python parser that maps untrusted names onto object attributes: enumerate the class's public attribute names and submit a header/field named after each one.
  3. get_server_ipaddress() was sender-controllable attribution. IP candidates were selected by appearance, not position, so a sender could write a bracketed address or HELO-shaped comment into the from clause that the extractor preferred over the MTA-written hop, forging the "originating IP". The fix encodes the correct invariant: a bracketed address the sender wrote is byte-identical to one the MTA wrote, so no pattern matching distinguishes them; selection must be positional (first token of the from clause is the HELO name, candidates must sit inside (/[ groups, the walk stops at the first trusted hop naming no address). For bug hunters: any product that reports, scores, or allow-lists on a library-derived "sender IP" from Received text is trusting sender bytes; prove with your own domain plus a Received-shaped payload and diff the attributed IP against the SMTP-connect IP in the receiving MTA's log.
  4. Quadratic/cubic ReDoS on RFC-compliant input. The address-header fallback regex (lazy [^<,]*? overlapping adjacent \s*, driven by finditer) degrades quadratically on < padding and cubically on whitespace, and it engages on the feature's happy path (From: alice@x <bob@x>), fully folded, RFC-5322-compliant headers within Postfix's default 102400-byte header limit. A compliant input is a DoS input whenever a regex fallback fires on well-formed data; include "valid-but-padded" shapes in every mail-parsing fuzz corpus. (The attachment-filename traversal leg, CVE-2026-129296 < 4.6.0, is the known validate-vs-write class already on the July 28 extraction page, tracked here for wave completeness.)

Operator framing (extends the September 17 bidirectional rule): the September legs proved outbound validator-vs-sender divergence; this wave proves the inbound parser-vs-bytes divergence, and the evasion value is higher than the crash value. When you find one mail-parsing CVE in a target's stack (Nodemailer here, mail-parser there), immediately diff parsed output against raw bytes across the whole header-name grammar; has_defects/defect flags are not oracles, they stayed false through every content-loss case. Lab-bounded: your own MTA or parse_from_bytes on synthetic messages, never live user mail.

November 16 second follow-up: mail-parser survives the 4.6.2 fix only to drop whole attachment batches and abort entire parses outside its own exception hierarchy (CVE-2026-129301 / GHSA-8cgq-x343-p74c, CVE-2026-129300 / GHSA-xhrq-2mqv-q8wx, mail-parser < 4.6.3)

Two legs published ~8 minutes after the four-pack above, same wave, fixed in 4.6.3, and one of them is a stronger evasion primitive than anything in the first batch.

  1. write_attachments() drops every attachment after a hostile one, silently. The loop called _safe_attachment_filename() and write_sample() unguarded, so one crafted part raised out of the whole save and every later part was never written, with no error surfaced to callers that catch only MailParserError. Weapon shape: put the poisoned part first and the real payload second; the detonation/scanner directory never sees the payload while the recipient's mail client still gets it intact. Three confirmed poison shapes, all from MIME metadata: filename*=us-ascii''evil%00.bin (NUL smuggled through RFC 2231 decode, ValueError from the name check), a 300-character basename (OSError: File name too long from open(), after creating a zero-byte stub), and a non-base64 body (binascii.Error, a ValueError subclass, raised inside the open() block). Note the parse itself succeeds and safe_filename is None, so the divergence only manifests at extraction time. Scanner-side test battery for any mail pipeline built on a Python parser: submit a two-part message with a hostile first part, then assert every part exists on disk and hash-diff the extraction directory against the raw message. Pipeline-side rule generalizes to every "write N artifacts in a loop" API: one raise = silent partial output, and partial output that looks complete (stub files left behind) is worse than an error.
  2. A single Received: line aborts the entire parse outside the library's exception hierarchy. A trailing date with an out-of-range year (Tue, 7 Mar 292277026596 14:29:24 +0000) or a timezone offset that pushes the timestamp past the int64 epoch raises OverflowError/OSError from calendar.timegm()/datetime.fromtimestamp(), and receiveds_format() only caught (TypeError, ValueError). Callers catching only MailParser* die; a queue worker loses the batch. This survives 4.6.2, i.e. it is the incomplete-fix twin of the four-pack's MailParserError-hierarchy leg (GHSA-24mq), same root pattern, new raise site. Audit rule: for any parser that promises a typed exception hierarchy, fuzz inputs that reach numeric conversion (dates, sizes, offsets, counts) and check whether the escaping exception is inside the promised hierarchy; the date/timezone properties already caught Exception while only the Received path stayed open, so sibling-property exception blocks are the diff to grep. Fix-band fingerprint: introduced by ca2aa6a in 3.7.0, reproduced across 3.7.0-4.6.2, patched in 4.6.3 (bad hop now reports date_utc: null instead of exploding).

November 26 follow-up: Nodemailer UTS-46 vs toLowerCase() recipient divergence = approved-address delivery to an attacker domain (GHSA-m567-8rf5-g5qq / CVE-2026-137514, high, 9.1.0 before 10.4.1)

Nodemailer lowercases recipient domains with JS toLowerCase() before UTS-46 IDNA mapping, while the application-side allow-list validates with WHATWG/UTS-46 rules. Two characters diverge: U+1E9E (capital sharp s) and word-final U+03A3 (Greek capital sigma) lowercase differently under JS vs UTS-46. Result: an attacker submits an address the app's allow-list approves (validator sees the canonical form) but Nodemailer delivers to a different registrable domain, so invites, shared links, and password-reset-adjacent mail land in the attacker's mailbox.

Operator rules (extends the September bidirectional validator-vs-sender rule):

  1. The allow-list and the transport are two parsers of one address; differential-test the grammar, not just the format. Battery per mail feature: ß/ẞ (U+00DF/U+1E9E), sigma Σ/ς word-final, dotless/turkish-i (İ/ı), fullwidth/compatibility forms, mixed ASCII+Unicode homographs. Register the lowercase-normalized divergence domain yourself and prove where the mail actually lands, owned callbacks only.
  2. Fuzz allow-list bypass on every outbound-mail feature independently. User-management "approved recipients" logic that runs before the send call is the gate; Nodemailer's normalization after the gate is the sink. Grep for sendMail( call sites and diff what each validator saw against what the transport resolved; the divergence is the finding.