CWE-1333
### Summary Two regular expressions used while parsing email headers backtrack polynomially on attacker-controlled input. Parsing a single small, well-formed email can consume minutes to hours of CPU, denying service to any process that parses untrusted mail. Both are reachable from an ordinary `parse_from_string()`, `parse_from_bytes()` or `parse_from_file()` call — no special API, option, or malformed structure is required by the victim. ### Details **1. Address-header fallback regex (`src/mailparser/utils.py`)** `get_addresses()` falls back to `_ADDR_FALLBACK_RE` whenever `email.utils.getaddresses(strict=True)` yields no usable address. The alternative `([^<,]*?)\s*<([^>]+)>` overlaps a lazy quantifier with an adjacent `\s*` — a space matches both. Driven by `finditer`, which retries at every offset and rescans the remainder, matching degrades to **quadratic** on `<` padding and **cubic** on whitespace padding. The fallback engages on the feature's own happy path, e.g. `From: [email protected] <[email protected]>`. Measured (4.6.0, CPython 3.14, macOS arm64; reproduced identically on Linux and on CPython 3.9, 3.11, 3.12, 3.13): | Padding | Parse time | | ---------------------- | ------------------ | | valid address + 750 sp | 0.38 s | | + 1500 sp | 2.97 s | | + 3000 sp | 23.4 s (×7.9/2×) | | + 6 KB sp | 185 s | | ~100 KB sp | hours | Fu