Skip to content

Address security advisories#90

Open
moussetf wants to merge 6 commits into
GOVCERT-LU:masterfrom
moussetf:fix-security-issues
Open

Address security advisories#90
moussetf wants to merge 6 commits into
GOVCERT-LU:masterfrom
moussetf:fix-security-issues

Conversation

@moussetf
Copy link
Copy Markdown
Collaborator

This change aims to address the following security advisories:

  1. URL extraction bypass via HTML entity encoding in clean_found_uri validation order is addressed by calling html_unescape on URLs in clean_found_uri(). As this means that an extracted URL might no longer occur as-is in the body text, I also added a new round of domain name extraction for all observed (i.e., unescaped) URLs.
  2. Recursion DoS in headeremail2list() via deeply nested CFWS in any address header is addressed by catching the RecursionError and falling back to a regexp-based email-address extractor.
  3. Quadratic complexity DoS in routing.noparenthesis() via deeply nested parens in Received headers is addressed by providing a linear-time implementation of the noparenthesis() function.

Frank Mousset added 6 commits May 15, 2026 17:27
This also runs the domain parsing loop a second type on all parsed URLs,
as the actual URL host part may no longer appear in the email body in
exactly the same way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant