parsedmarc Updates & Release Notes

Follow

10 updates curated from 1 source by the Releasebot Team. Last updated: Nov 25, 2026

Get this feed:
  • Nov 11, 2026
    • Date parsed from source:
      Nov 11, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.3.0

    parsedmarc ships extensive security and reliability fixes, including safer database connections and IP database caching, bounded DNS lookups, and improved handling of invalid or oversized reports so they are less likely to disrupt batch processing.

    Security The seen-aggregate-report cache no longer keeps every distinct report in memory for the life of the process (GHSA-9fw6-mwqr-p43m, affects 11.2.2 and earlier). The cache that recognizes a duplicate aggregate report is meant to forget a report after one hour, but the expiringdict package it is built on removes an expired entry only when that same key is looked up again, and otherwise drops its oldest entry only once it holds max_len entries, which was 100 million. A report that is never received again is never looked up again, so in watch mode every distinct aggregate report stayed in memory until the process exited. The cache key was the reporter's name, the Report-ID and the policy domain as JSON, all three chosen by the sender with no length limit below the 32 MiB decompression cap: ten emails each carrying a 5.6 KB gzip attachment with a 5 MiB <report_id> left 64 MiB held by the cache, and none of it was released two hours after the one-hour expiry. Expired entries are now removed each time a report is added to the cache, the cache holds at most 100,000 entries, and the key is a SHA-256 digest of the three fields, so its size no longer depends on the report. Compatibility: the cache is process-local and never saved, so nothing persisted changes; a report is still recognized as a duplicate for one hour. Reported by helixnebulatech. Reverse DNS lookups are limited to 120 seconds per aggregate report when they fail or are slow, and to 600 seconds in total (GHSA-rwfh-ww9c-jm9m, affects 11.2.2 and earlier). Each <record> of an aggregate report triggered one blocking reverse DNS (PTR) lookup of its source IP, one record after another, with no bound on the number of lookups or the time they took, and the sender chooses those IPs. An IP whose reverse zone never answers costs the whole DNS lifetime, dns_timeout times the number of nameservers: 2 s × 4 default nameservers = 8 s. Repeating one such IP did not help, because a result with no PTR whose AS domain is not in the reverse DNS map is deliberately kept out of the IP address cache, so the same IP was looked up again in every record. Measured against a nameserver that never answers, parsing took 2.2 s per record with one nameserver and 8.2 s per record with four, so a 1 MB report of about 3,500 records held up processing for hours, and no other message was processed meanwhile. Lookups that return no PTR, and lookups that take at least one second whether or not they return a name (a sender who controls the reverse zone could otherwise answer every query with a name just before the timeout), now share a budget of 120 seconds per report. Fast lookups that find a PTR are not counted toward it, so a large legitimate report keeps its enrichment, but every lookup counts toward a second budget of 600 seconds per report for all reverse DNS lookups, since a sender who controls the reverse zone could otherwise answer every query just under one second (5,000 distinct source IPs resolving in 100 ms each use 500 seconds). Once either budget is spent, the report's remaining records are enriched from the local IP database and reverse DNS map only, and one warning is logged: "Reverse DNS lookups for this report failed or were slow for 120 seconds; the remaining records are enriched from the local IP database and reverse DNS map only", or "Reverse DNS lookups for this report took more than 600 seconds; ..." with the same ending. Results produced after the limit are not cached, so those IPs are looked up normally in the next report. Each distinct source IP is also looked up at most once per report. Deployments with offline = True make no DNS queries and were never affected. Reported by helixnebulatech. A report value that PostgreSQL rejects no longer holds back the whole batch (GHSA-fxr7-7h9q-v949, affects the PostgreSQL output in 11.2.2 and earlier). The PostgreSQL output inserted report values into typed columns without checking them, and three values a sender controls were rejected by the server or the driver: an aggregate <count> above 2,147,483,647 (integer out of range in the INTEGER message_count column), an SMTP TLS sending-mta-ip or receiving-ip that is not an IP address (invalid input syntax for type inet), and a NUL character in a failure report's sample, for example a Subject: of =?utf-8?q?a=00b?= (PostgreSQL cannot store NUL in text or jsonb). A fourth trigger, an SMTP TLS start-datetime PostgreSQL cannot read, has mostly been rejected by the parser since 11.2.2; the remainder (partial dates such as 2016, which the parser still accepts and PostgreSQL may reject) now raise PostgreSQLRejectedReport like any other rejected value and no longer hold back the batch. Each rejection was recorded as an output error, which marks the whole batch as not saved, so none of the batch's messages was archived, including legitimate reports from other senders. In watch mode the batch was retried max_unsaved_retries times and then moved to Archive/Unsaved; in one-shot mode (cron) the retry counter restarts with every run, so the batch stayed in the inbox and its legitimate reports were sent again to every output that does not deduplicate on every run. An aggregate record whose count is outside 0 to 2,147,483,647 is now skipped with a "Could not parse record" warning (a report with only that one record becomes invalid, as with any other bad record), and an SMTP TLS session count outside that range makes the report invalid; the bound matches PostgreSQL's INTEGER count columns (the Elasticsearch and OpenSearch outputs install no mapping for any count, so those clusters map each one dynamically as long, a range the bound also keeps every count within). An SMTP TLS sending-mta-ip or receiving-ip that is not an IP address (or carries an IPv6 zone ID) is dropped from the failure details with a warning, which also keeps it out of the Elasticsearch and OpenSearch ip fields. An IPv6 zone ID (fe80::1%eth0), which the inet type cannot hold, is removed from an aggregate record's source_ip and a failure report's Source-IP (everything from the first %) with a warning naming the field, and the record or report is kept with the bare address. The PostgreSQL output replaces NUL with U+FFFD, the replacement character, in every text, text array and JSONB value it writes. Any other value PostgreSQL rejects (a psycopg.DataError) now raises the new PostgreSQLRejectedReport, a subclass of PostgreSQLError whose message names the report; the CLI logs it as an error and skips that report in the PostgreSQL output only, and the batch is saved and archived as usual. With fail_on_output_error set it is an output error that stops the run, as before. The in-memory max_unsaved_retries counter in one-shot mode is unchanged: the batches it still holds back are the ones an output could not save at all, such as an unreachable server, which the documentation describes as the intended safe direction. Reported by helixnebulatech. The PostgreSQL output no longer sends the database password in plain text when an attacker declines TLS (GHSA-xvp7-7762-gx9g, affects the PostgreSQL output in 11.2.2 and earlier). PostgreSQLClient connected without an sslmode, so libpq used its default, prefer: it asks the server for TLS and, when the answer is no, continues over plain TCP and answers whatever authentication request comes next. That answer arrives before any encryption, so an on-path attacker who declined TLS and then requested a clear-text password received the database password (CWE-319), and with it every stored report. The output now connects with sslmode=require by default, so a connection without TLS fails before the user name or password is sent. The new [postgresql] sslmode option (and the sslmode argument of PostgreSQLClient) sets any libpq mode, and sslrootcert names the CA certificate that verify-ca and verify-full check the server against. When sslmode is not set, an sslmode in connection_string or the PGSSLMODE environment variable is respected. A warning is logged at startup when a TCP host other than localhost or a loopback address is used with a mode that does not verify the server certificate (require with an existing sslrootcert file is not warned about, because libpq then verifies the certificate as verify-ca does). With a connection_string, nothing parsed from the string reaches the log or an error message: a connection failure is reported with a fixed message (plus the server's SQLSTATE code, when it sent one) instead of the driver's, and the startup warning names neither the server nor any other value from the string. libpq ends a URI's user name and password at the first @ or /, so the rest of a password containing either becomes the host, port, database name, or a query parameter, which the warning and the driver's errors would otherwise repeat (postgresql://u:SECRET/x@db/d failed with invalid integer value "SECRET" for connection option "port"). The separate host, port, user, password, and database settings keep the driver's message, with URL credentials masked. As a convenience, a URI that libpq would parse that way (an unencoded @ in its host list or database name, or in a query value before the first /, or an @ after a host whose port is neither empty nor a number) is refused with a fixed error before anything is logged or a connection is attempted; this recognizes the common mistake but is not what keeps the password out of the logs. Percent-encode @ and / in a URI's user name or password (%40, %2F). A keyword/value connection string is not checked, because its password is a keyword of its own. Any other error while connecting, such as the UnicodeEncodeError psycopg raises with the whole connection string it built when the password holds a character it cannot encode, is replaced with a fixed message as well, and the CLI no longer chains the PostgreSQL client's error to the RuntimeError it raises. A table creation failure is likewise reported with a fixed message (plus the SQLSTATE) instead of the server's, which can quote a setting from the string's options (tablespace "X" does not exist for -c default_tablespace=X), and a connection whose setup or table creation fails is closed instead of left open. Compatibility: a server that offers no TLS at all now fails with libpq's "server does not support SSL, but SSL was required". Set [postgresql] sslmode = disable (or prefer) to allow it again, recommended only for a Unix socket or the loopback address. require still accepts any certificate, so a remote server should use sslmode = verify-full with sslrootcert. Reported by helixnebulatech. An Elasticsearch or OpenSearch password containing /, ? or # no longer appears in the startup error (GHSA-74xv-rmpx-2pjm, affects 11.2.2 and earlier; an incomplete fix for GHSA-hjr3-rx4c-24cv). 11.2.0 masked the credentials in hosts URLs logged with --debug, but not in the error raised when the client cannot be built. When the password in a hosts URL contains an unencoded /, ? or #, the URL cannot be parsed, and the client library's error quotes the whole URL (Elasticsearch) or the start of the password (OpenSearch). parsedmarc repeated that text at ERROR level, without --debug, on the console, in log_file and in any log pipeline: Output client error: Elasticsearch: Could not parse URL 'https://dmarc:<password>@es.example:9200' and Output client error: OpenSearch: Port could not be cast to integer value as '<start of password>'. The error was also chained to the library's, so a failed SIGHUP reload, which logs the full traceback, printed it a second time. A hosts value that cannot be parsed now fails with a fixed message that names no part of it: "Elasticsearch: could not build a client from the hosts setting (details withheld because they may include credentials; URL-encode special characters in the password, or use the separate user and password settings)", and likewise for OpenSearch. Any other Elasticsearch or OpenSearch startup error keeps its text with URL credentials masked, and neither is chained to the original error any more. Reported by helixnebulatech. The downloaded IP database is cached in a private per-user directory and checked before it is used (GHSA-5f56-8ph8-v9q5, affects 9.6.0 through 11.2.2). load_ip_db() cached the IPinfo Lite database it downloads at a fixed path in the shared system temporary directory, /tmp/parsedmarc/ipinfo_lite.mmdb on Linux. Another local user could create /tmp/parsedmarc first; parsedmarc accepted the existing directory, wrote the download through a symlink planted at ipinfo_lite.mmdb.tmp, and used whatever file was at ipinfo_lite.mmdb whenever the download was skipped or failed, which that user could force, with no check of its owner or content. That let them overwrite any file the parsedmarc user can write (its configuration, a Gmail token.json, an output file) with the download, or supply the MMDB file that decides every source IP's country and ASN and that maxminddb then parses. The database is now cached in $XDG_CACHE_HOME/parsedmarc or ~/.cache/parsedmarc (%LOCALAPPDATA%\parsedmarc\cache on Windows), created with mode 0700 and used only if it is a real directory, not a symlink, that the user can write to and, on POSIX, owns and is not writable by its group or by others. Otherwise parsedmarc logs a warning and uses a new private temporary directory for that run, downloading the database again on every run, and never changes the permissions of a directory it did not create. The download is written to a new file created exclusively with mkstemp(), opened with maxminddb to check that it is a valid MMDB, and only then moved into place with an atomic os.replace(), which replaces a symlink rather than following it. A cached copy is used only if it is a regular file and, on POSIX, owned by the user; otherwise the bundled copy is used. The old /tmp/parsedmarc/ipinfo_lite.mmdb is no longer read, and can be removed by hand. Only multi-user hosts whose temporary directory is shared were exposed; the Docker image and systemd units with PrivateTmp= were not. Reported by helixnebulatech. One aggregate report too large for the Logs Ingestion API no longer stops the Log Analytics output from publishing the batch (GHSA-rg4h-58fm-8pc9, affects the Log Analytics output in 11.2.2 and earlier). The Azure Monitor ingestion SDK packs whole reports into upload calls of up to 1 MiB and never splits a report, so a report whose JSON is larger than that is sent as a call of its own, and the Logs Ingestion API rejects any call over 1 MB. An aggregate report of a few thousand records is that large, while its gzipped XML is only a few kilobytes. The rejected upload raised an error before the failure and SMTP TLS streams were sent, and parsedmarc treated it as an output error: the whole batch, legitimate reports from other senders included, was retried and finally moved to the Unsaved folder. A report whose JSON is over 1,000,000 bytes is now left out with a warning that names it, and the other reports are uploaded. Each of the three streams is now published even when another fails; a failed upload is still reported as an output error, naming every stream that failed. Reported by helixnebulatech. Added [postgresql] sslmode and sslrootcert options (and PostgreSQLClient arguments) to choose the TLS mode of the PostgreSQL connection and the CA certificate that verifies the server. Changed mailsuite 2.3.7 or later is now required. It fixes mailsuite's parse_email() keeping the carriage returns of a CRLF message's address headers, which left a trailing \r in the from, sender and delivered-to values, or added an extra entry to to, cc, reply-to and bcc when the value ended with a comma; empty values are now treated as absent for both CRLF and LF input (seanthegeek/mailsuite#74). parsedmarc parses report emails with its own code, not mailsuite's parse_email(). parse_report_file() now refuses an input larger than 32 MiB before reading it into memory (#949). The size cap (MAX_DECOMPRESSED_REPORT_SIZE) was applied only after the whole input had been read, so a path, a bytes object or a file object larger than the cap was held in memory first. The size of a path and the length of a bytes, bytearray or memoryview input are now checked up front, and a file object is read at most one byte past the cap (it is left positioned there). The input is rejected with ParserError and the same message as before (the report is larger than 32 MiB). A valid compressed report is smaller than its decompressed form, so the one cap applies to both. A report dated more than two days in the future is now rejected (#947). With Elasticsearch or OpenSearch output a report's own date names its dated index (dmarc_aggregate-YYYY-MM-DD), and nothing compared that date with the present, so a report with <begin>4102444800</begin> created an index for the year 2100. An aggregate report whose begin or end date (a report split per day names an index from each day it covers), an SMTP TLS report whose start-datetime, or a failure report whose Arrival-Date is more than 2 days ahead of the current time (MAX_REPORT_FUTURE_DAYS) is now rejected with InvalidAggregateReport, InvalidSMTPTLSReport or InvalidFailureReport, so a mailbox message is moved to the Invalid folder. The two days absorb a reporter's clock skew and time-zone mistakes; dates in the past are not bounded, so archives of old reports still parse. Python 3.10 is no longer supported, and Python 3.15 is. Python 3.10 reached end of life in October 2026; requires-python is now >=3.11. Python 3.15 is now tested in CI and listed as supported. Bug fixes One invalid report attachment no longer stops the rest of an mbox file from being parsed. parse_report_email() raised a bare ParserError for a message whose aggregate XML or SMTP TLS JSON attachment was invalid (for example an aggregate report whose date range spans more than 366 days), and the mbox loop only skipped InvalidDMARCReport, so that one message aborted the whole file. It now raises InvalidDMARCReport, or InvalidSMTPTLSReport for an SMTP TLS attachment (both still ParserError subclasses), and the mbox loop skips both with a warning and parses the rest. A message that cannot be parsed at all still stops the file with a ParserError. Mailbox connections were not affected. Reported by mjatin2007. Unknown child elements under an aggregate record's <identifiers> and inside a <reason> are no longer copied into the parsed report (#948). _parse_report_record() copied both mappings whole, so an element that RFC 9990 Appendix A and RFC 7489 Appendix C do not define reached the JSON, Kafka, S3 and webhook outputs with whatever structure the report gave it. Only header_from, envelope_from and envelope_to, and a reason's type and comment, are kept. Compatibility: a consumer of those outputs that read such an extra key no longer receives it. The Elasticsearch and OpenSearch aggregate document classes declare message_count and original_timespan_seconds as long. Both were written = Integer without parentheses, which assigns the field class itself and declares no field, so reading either attribute from an _AggregateReportDoc returned the class instead of the stored value. They are now Long(), not Integer(), because that is the type the clusters already hold: parsedmarc does not install the document classes' mappings (the indexes and templates it creates declare only the date fields), so Elasticsearch and OpenSearch have always mapped both fields dynamically as long. The documents sent are unchanged, and existing and new indexes are unaffected.

    Original source
  • Nov 10, 2026
    • Date parsed from source:
      Nov 10, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.2.2

    parsedmarc hardens report processing with limits that reject malicious or oversized email and XML inputs, safer report normalization and output handling, and options to time out slow parses or quarantine messages that repeatedly crash processing.

    Security

    Crafted email messages no longer take seconds to minutes and hundreds of megabytes to parse (GHSA-qcc2-4x3v-v4g7, affects 11.2.1 and earlier). parse_report_email() (mailbox, mbox and file input) and the failure-sample parser parsedmarc.utils.parse_email() gave the whole message to mail-parser and Python's email package with no limit on blank lines, header lines, header field size, MIME parts or nested multiparts. Parsing builds one Message per blank line after a message/delivery-status part (512 KiB of blank lines took 6.1 s and 283 MiB of extra memory on 11.2.1 under Python 3.12) and tests every line against every open boundary of nested multiparts (900 levels around 30,000 parts, 0.3 MB, took 10.9 s); a 4 MiB flood of header lines took 1.4 s, and a 1 MB To: address group of 250,000 members took 1.9 s, or 44 s through mailsuite's own parse_email(), which parsed the group whole. With n_procs = 1 the rest of the mailbox waited behind such a message, and a process with a memory cap was killed before the message was moved, so it was parsed again on the next run.

    Both parsers now call mailsuite.utils.check_message_limits(), new in mailsuite 2.3.5 (GHSA-748w-c9w9-79xp), before mail-parser sees the message. It parses the message with the email package's own feed parser under the compat32 policy, the parser mail-parser and email.message_from_string() use, and stops as soon as the message has more than 10,000 parts (the message itself, its MIME parts, the bodies of message/* parts and each block of a message/delivery-status body), nests them more than 100 levels deep, or makes the parser test a line against an open boundary more than 20,000,000 times. It also stops when the message's header blocks hold more than 100,000 lines in all (folded lines and lines the parser keeps only as defects included). It then rejects a parsed message with a header field longer than 65,536 characters (name, colon and raw value, folded lines included), or whose From, Sender, Reply-To, To, Cc, Bcc and Delivered-To headers hold more than 262,144 characters in all, counted in every part; that limit bounds mail-parser's own address parsing (it parses From, Reply-To, To, Cc, Bcc and Delivered-To), which does work for each malformed address item. When a part lacks its start boundary, mail-parser parses the top-level epilogue again, and that text is checked with the same limits.

    parse_report_email() also no longer renders every part it walks as text: it renders a part only where it reads it, because rendering each level of a deep nesting rendered everything inside it again (98 nested multiparts around a 20 MiB leaf took 26.6 s, a chain of 99 message/rfc822 parts around a 10 MiB leaf 11.3 s, and a chain of 99 message/feedback-report parts around a 10 MiB leaf 11.6 s, all within the limits; each now takes under a second). An over-limit email raises InvalidDMARCReport("Message rejected: Message exceeds <limit> (<value>)"), which the mailbox loop files under Invalid; an over-limit failure-report sample raises InvalidFailureReport("Sample message rejected: …"). Each crafted message from the report is now rejected in under half a second (the 4 MiB header flood, the slowest, in 0.2 s). mailsuite 2.3.5 or later is now required. The floor applies to the base dependency and to the msgraph, gmail and all extras. mailsuite 2.3.5 also removes RFC 5322 group syntax from address header values over 8 KiB before parsing them, caps the address header value its own parse_email() reads at 65,536 characters, and fixes a quadratic url_regex; all only affect callers of mailsuite's parse_email(), which parsedmarc does not use. A message that still takes too long to parse can now be set aside with the new parse_timeout option (see Added).

    Compatibility: the limits are fixed; no option changes them. A message with more than 10,000 parts or parts nested more than 100 levels deep is now rejected as invalid instead of being parsed or, when nested past Python's recursion limit, failing with a ParserError; in mbox input such a message (the nested message of GHSA-qxwv-2vwj-v828 is one) is now skipped with a warning instead of stopping the run. A message/rfc822 attached inside a failure report's sample no longer replaces the sample, since a feedback report has one sample (RFC 6591 §3.1), and only the first message/feedback-report part of a message is read, since a feedback report has one (RFC 6591 §3).

    Reported by helixnebulatech.

    Deeply nested or very wide aggregate report XML no longer exhausts memory (GHSA-q7gm-8cj9-94hr, affects 11.2.1 and earlier). parse_aggregate_report_xml() passed the decompressed report, up to the 100 MiB decompression cap, to xmltodict.parse() with no limit on nesting depth or element count. xmltodict keeps one stack entry per open element and expat reports missing end tags only at the end of the input, so a gzip attachment of about 30 KB holding 30 MiB of unclosed <a> tags needed more than 2 GB of memory (2 MiB of them cost 255 MiB on 11.2.1). The out-of-memory killer ended the process before the message was moved, so every restart parsed it again. A document of millions of sibling elements did the same at a smaller scale, and a document whose first parse failed was parsed again through lxml recovery and a second xmltodict pass.

    While expat reads the document, before xmltodict adds each element to its tree, parsedmarc now counts nesting depth and nodes (elements plus attributes); a report deeper than 100 levels (MAX_XML_DEPTH) or with more than 1,000,000 nodes (MAX_XML_NODES) is rejected as InvalidAggregateReport("Invalid XML: …") without trying lxml recovery. Before any parser sees the document, a tag longer than 65,536 characters (MAX_XML_TAG_LENGTH) is rejected too, because expat and libxml2 build an element's whole attribute list before its attributes can be counted (one element with 900,000 attributes, 9.3 MiB, within the node limit, took 1.1 s and +200 MiB; it is now rejected in under 0.1 s). Because a quoted attribute value may hold a raw >, which splits a tag for that scan, a document with more = characters than the node limit is rejected first, in one pass (2,000,000 x=">" attributes, 23.7 MiB, took 1.4 s and +310 MiB before the node limit rejected them; they are now rejected in under 0.1 s). The decompression cap for a report attachment is lowered from 100 MiB to 32 MiB (MAX_DECOMPRESSED_REPORT_SIZE), and an uncompressed report of more than 32 MiB of UTF-8 is rejected the same way, as is a report file of that size, which is no longer tried as a report email: at the node limit a legitimate report is at most about 28 MB, and with that cap a report's text is bounded along with its node count.

    When the first parse fails and lxml recovery runs, a parser target that builds no tree first counts the document's elements, attributes and namespace declarations against the same node limit (a 22 MiB wide document behind a malformed XML declaration took 5.0 s and 1,532 MiB of extra memory before, 0.57 s and 23 MiB now), and the recovered XML then goes through the same depth and node limits in the second xmltodict pass. A mailbox message that still kills the process before it is filed can now be set aside after two attempts with the new [mailbox] attempts_file option (see the last entry in this section).

    Compatibility: there is no new option. A real report is fewer than 10 levels deep and the largest sample (909 KB) has 32,019 nodes, so the node limit is a report of about 28 MB of XML; a larger report is now rejected. A report at the size cap needs about 400 MB of memory on the lxml recovery path and about 350 MB otherwise when its text is parsed directly, and about 500 MB and 450 MB through parse_report_file(), which also holds the file's bytes, where a report under the old 100 MiB decompression cap could need gigabytes. An aggregate or SMTP TLS report of more than 32 MiB of UTF-8, compressed or not, is now rejected, where 100 MiB was accepted (an uncompressed SMTP TLS report had no cap: 60 MiB of JSON cost +1,505 MiB). parse_report_file() no longer tries a file that begins with < as SMTP TLS JSON or a report email, nor one that begins with { as a report email; its error message is unchanged, and the exception's cause now matches the format the file begins with. It also keeps only each failed attempt's message while it tries the next format, so a file at the size cap on the lxml recovery path takes +500 MiB there, where it took +1,046 MiB. The XML parse step is about 20% slower, and a malformed document that needs lxml recovery is now parsed twice by lxml (once to count, once to build the tree).

    Reported by helixnebulatech.

    An aggregate report with a huge date range can no longer expand into millions of records or fill an Elasticsearch or OpenSearch cluster with indexes (GHSA-p85v-578x-3wcf, affects 11.2.1 and earlier). An aggregate report whose <date_range> was longer than normalize_timespan_threshold_hours was split into one record per calendar day, with no limit on the number of days. A report under 2 KB declaring a range of millions of days with a large <count> expanded one <record> into millions of records (200,000 days gave 200,000 records in 0.8 s; the reporter's 2.9 million days exhausted 2 GB of memory). With Elasticsearch or OpenSearch output each of those days created its own dated index of one shard until the cluster reached cluster.max_shards_per_node (1,000 by default), after which it refused every new index for every application using it.

    A report whose date range is negative or longer than 366 days (MAX_REPORT_SPAN_DAYS) is now rejected with InvalidAggregateReport. A report whose split would produce more than 250,000 records (records times days, MAX_NORMALIZED_RECORDS) is not split: its records are kept whole over the report's own date range, and one warning is logged (10,000 records over 366 days, each with a large <count>, produced 3,670,000 records in 13.5 s and 1.7 GB of memory before). In Elasticsearch and OpenSearch a single report creates at most 31 dated indexes (MAX_INDEXES_PER_REPORT): any further records are saved to the report's first index with their own dates, and one warning is logged for the report. Dated index names still come from each report's own dates, so reports with many different dates still create one index per date; data streams (use_data_streams) are affected by neither.

    Compatibility: a genuine report spanning more than 366 days is now rejected; a report too large to split has timespan_requires_normalization: false and records with normalized_timespan: false; there is no new option.

    Reported by helixnebulatech.

    One crafted report can no longer make an output fail and stop every run on the same mailbox (GHSA-4272-4r8g-6c5h, affects 11.2.1 and earlier). Some reports made a configured output raise an exception that process_reports() did not catch. It escaped the mailbox save callback, parsedmarc logged "Mailbox Error" and exited with status 1, and the batch stayed in the mailbox, so every one-shot run failed on the same message, outputs that do not deduplicate received the batch's legitimate reports again on each attempt, and watch mode finally moved the whole batch to Unsaved.

    The triggers were a failure report whose sample has an empty From:, To: or Reply-To: header (a legitimate To: undisclosed-recipients:; too) with Elasticsearch or OpenSearch output (IndexError); an SMTP TLS report with a field of the wrong type, such as "policy-string": [1] with file output (TypeError in the CSV writer) or "start-datetime": 5 with Elasticsearch, OpenSearch, Splunk HEC or PostgreSQL output; and an aggregate report whose policy override <reason> has no <type>, or a <type> with an attribute or given twice, with file output (KeyError, TypeError).

    Every output destination in process_reports() now records any exception as an output error, as the aggregate Elasticsearch and OpenSearch blocks already did (the failure and SMTP TLS Elasticsearch and OpenSearch blocks, every PostgreSQL and Splunk HEC block and the file output lacked that catch-all), so the batch is reported unsaved and fail_on_output_error still applies. SMTP TLS reports are now type-checked against RFC 8460 §4.4 and rejected as InvalidSMTPTLSReport otherwise: a string for organization-name, report-id, policy-domain, policy-type, result-type and the optional failure-detail strings, a string or a list of strings for contact-info, a list of strings for policy-string, an integer or null for each session count (true and false are rejected), and a list of objects for failure-details. start-datetime and end-datetime must convert with the same functions the outputs use and be at most 64 characters long, because dateutil took 12.4 s to fail on a date of 1,000,000 digits. A string holding a lone surrogate (JSON "\ud800"), which I-JSON (RFC 7493 §2.1) forbids, is rejected too: it passed every type check and made printing the results to standard output raise UnicodeEncodeError, which process_reports() now also records as an output error; a report that cannot be printed to the console (a non-UTF-8 console, a closed pipe) is now recorded as an output error instead of ending the run.

    A policy override reason's type and comment are normalised to a string or null (an element with an attribute to its text, a repeated element to null), so the CSV writer and the Elasticsearch and OpenSearch saves no longer fail on them. An address header with no address is left out of the Elasticsearch and OpenSearch failure document and of the duplicate query. The Splunk HEC SMTP TLS save raises SplunkError on a date it cannot convert, and the PostgreSQL date helper passes a non-string value through unchanged.

    Compatibility: an SMTP TLS report with a field of the wrong type that used to parse is now invalid and goes to Invalid; a policy-string that is not a list is now rejected (it was silently dropped), while a null one is still accepted as absent. A policy override reason without a type now has type: null and is written as none in CSV; one whose type has an attribute is stored as its text, and a repeated one as null.

    Reported by helixnebulatech.

    One crafted report can no longer change the field types of an Elasticsearch or OpenSearch index and get every later report rejected (GHSA-qpcg-29vr-jwm3, affects the Elasticsearch and OpenSearch outputs in 11.2.1 and earlier, data streams included). Indexes and the data-stream index template were created without field mappings, so the cluster typed each field from the first document that held it, with date detection on, and a dated index is named from the report's own begin date. One crafted report could make report_id a date field (<report_id>2026-11-09</report_id>), turn sample.headers.subject into an object (with a sample header named Subject.x), or use up index.mapping.total_fields.limit (1,000 fields) with invented sample header names. Every later legitimate report for that index, or for that data stream until its next rollover, was then rejected with a mapping error, retried and moved to Unsaved; this was confirmed against Elasticsearch 8.19.7 and OpenSearch 2.19.3.

    New indexes and data-stream templates are now created with date detection off and the date fields declared as dates (@timestamp, date_range, date_begin and date_end; for failure reports @timestamp, arrival_date and sample.date); when an aggregate report is parsed, every XML attribute is dropped and every field the schema types as a string is stored as a string or null, so a report cannot change a field's type (an element with an attribute or a child element, such as <p a="1">none</p> or <p><x>1</x></p>, became an object that mapped the field as one). In failure documents sample.headers is mapped with dynamic: false and indexes only 29 headers, those the shipped dashboards reference plus cc; every header stays in _source except a From, To or Reply-To header that holds no address (see GHSA-4272-4r8g-6c5h above), and a . in a header name is stored as _. create_indexes() and create_data_streams() take a new optional mappings argument.

    Compatibility: existing dated indexes are not changed; the protection applies to dated indexes created by 11.2.2 or later, and, because parsedmarc puts the data stream template again in every process, to an existing data stream's next backing index after a rollover. On those, sample headers outside the list are no longer searchable. The new "Field mappings" sections of the Elasticsearch and OpenSearch documentation show how to add one through the <stream>@custom component template (Elasticsearch data streams), an index template (dated indexes) or the put-mapping API (OpenSearch data streams, repeated after each rollover). For string fields, an aggregate report element with text and a stray child element now yields its text, where it yielded an empty string or an object before: samples/aggregate/invalid_xml.xml, whose <header_from>bad<xml.net</header_from> lxml recovery turns into mixed content, now gives the header-from domain bad. A <begin> or <end> with mixed content is still rejected. This narrows, but does not replace, the explicit mappings proposed in #782.

    Reported by helixnebulatech.

    A message that kills parsedmarc while it is being parsed is no longer parsed again on every run (the retry-loop part of GHSA-qcc2-4x3v-v4g7, GHSA-q7gm-8cj9-94hr and GHSA-4272-4r8g-6c5h, affects 11.2.1 and earlier). A mailbox message is moved out of the reports folder only after it has been parsed, so a message whose parse ended the process (the out-of-memory killer, a container memory limit) stayed in place, and every later one-shot run or service restart parsed it again and died before reaching the reports behind it. The fixes above reject the messages those advisories describe; the new [mailbox] attempts_file option is the backstop for any other.

    When it names a file, parsedmarc records each message in it before parsing it and removes the entry as soon as the parse returns a report or rejects the message, so an entry left behind marks a parse that never finished. A message found with two unfinished attempts (parsedmarc.attempts.MAX_PARSE_ATTEMPTS) is logged at error level ("Message UID … in … has 2 unfinished parse attempts; the limit is 2") and moved to Invalid, or deleted under delete_invalid, without being parsed or counted again; its entry is removed once it has left the folder, and a message left in place (a failed move, test mode) keeps the same count. With n_procs above 1 or parse_timeout set, a message that was being parsed when a run died is parsed alone on the next run, after the rest of its batch, so the messages parsed beside it are not blamed; it is parsed in the main process, or, with parse_timeout set (see Added), in a worker process of its own, so the timeout still applies to it. The entry is removed before the batch is saved, so a failed save still follows max_unsaved_retries and Unsaved and is never counted as a crash.

    A message is identified by the reports folder, its id and a hash of its first 64 KiB, because mailsuite's IMAP backend does not expose UIDVALIDITY, so a new message that reuses an old UID starts at zero. The file is JSON, written atomically and readable by its owner only, and entries older than 30 days are dropped; a file of another shape is replaced with a warning, and a file that cannot be written logs an error and turns the protection off for the rest of the batch without stopping the run. PARSEDMARC_MAILBOX_ATTEMPTS_FILE sets it from the environment (it names the file directly, like PARSEDMARC_GENERAL_LOG_FILE, so PARSEDMARC_MAILBOX_ATTEMPTS_FILE_FILE is its Docker-secret form). get_dmarc_reports_from_mailbox() and watch_inbox() take a new attempts_file argument. The systemd and Docker Compose examples in the documentation now keep the file in a state directory and a named volume.

    Compatibility: the option is unset by default, which keeps the previous behaviour; there is no option for the number of attempts.

    Added

    [general] parse_timeout stops a report file or message that takes too long to parse (GHSA-qcc2-4x3v-v4g7). The parse limits above bound every input known to take long, but a message they do not cover could still hold up the rest of the run. With parse_timeout set to a number of seconds (300 is a reasonable value), a parse that runs longer is stopped and the input is treated as invalid: a report file is logged as failed and, with archive_directory, moved to Invalid; an mbox message is skipped with a warning; a mailbox message is moved to the Invalid archive folder, or deleted with delete_invalid.

    A parse can only be stopped by ending the process that runs it, so with a timeout set parsing always runs in worker processes, even with n_procs = 1; when one times out, every worker process is stopped and restarted, and the other inputs that were still being parsed start again. parsedmarc checks the time only while it waits for a parse result, so a parse is stopped within one second of parsedmarc next waiting for a result after its time is up, and can run on past the timeout while parsedmarc is busy between results (moving messages, for example); its clock starts only when a worker begins it, not while it waits for one. With a timeout set, workers hand each result back through a file in a private temporary directory (under TMPDIR), so that stopping a worker while it returns a large result cannot leave the process pool, or the interpreter at exit, waiting forever; that directory must be writable.

    get_dmarc_reports_from_mbox(), get_dmarc_reports_from_mailbox() and watch_inbox() take a matching parse_timeout keyword argument, and parsedmarc.parallel.parallel_map() takes parse_timeout and timeout_result; a timed-out message is a ParseTimeoutError, a subclass of InvalidDMARCReport. The setting is reloaded on SIGHUP.

    Compatibility: the default, 0, means no limit, so nothing changes unless it is set.

    Bug fixes

    A failure report's RFC 6591 feedback report and sample can no longer be replaced by legacy report text. parse_report_email() also reads the legacy text format, a text/plain part beginning "A message claiming to be from you has failed" that carries the source IP and the sample, and a later such part replaced the message/feedback-report part and the sample already read. A text/plain part inside the sample, which is the spoofed message's own text, could therefore set the report's Source-IP and sample. Once a message/feedback-report part is read, legacy text parts are ignored, and the RFC 6591 part and its sample win over a legacy part that came before it; a legacy part followed by a message/feedback-report part with no sample after it (RFC 6591 §3.1 puts the sample after the report part) is now rejected as InvalidDMARCReport, where a mix of the two was returned.

    Parts inside the sample, which are the reported message's own attachments, are no longer read as reports either: an SVG, zipped HTML or application/json attachment there made the whole email invalid, and a gzipped aggregate report or SMTP TLS JSON there was returned in place of the failure report. This holds for a second sample part too, which is not read as the sample; a report attached beside the sample, outside it, is still read.

    SMTP TLS reports keep their MX host patterns (#942). RFC 8460 §4.4 keys a policy's MX host patterns mx-host; mx-host-pattern is the name of the value's type ("a JSON array of strings"), and the example in Appendix B gives a plain string. parsedmarc read only mx-host-pattern, so every RFC-conformant report lost the field. mx-host is now read first, as a list of strings or a plain string (which becomes a one-element list); mx-host-pattern is kept as a fallback, and a plain string there is now kept too. The output key mx_host_patterns and its PostgreSQL TEXT[] column are unchanged, and samples/smtp_tls/rfc8460.json now yields ["*.mail.company-y.example"]. Reported by kowax.

    A failure report's duplicate check no longer lets a search error escape the Elasticsearch and OpenSearch outputs. save_failure_report_to_elasticsearch() and save_failure_report_to_opensearch() called the duplicate-check search without the handler the aggregate and SMTP TLS saves have, so a connection or query failure raised the search library's own exception. It is now an ElasticsearchError or OpenSearchError, which process_reports() records as an output error.

    A date string of hundreds of thousands of digits no longer takes seconds to fail. human_timestamp_to_datetime() had no length limit, so a failure report's Arrival-Date, a message's or failure sample's Date header, or any other date it converted went to dateutil whole (a digit string of 262,144 characters took 0.87 s to fail and one of 1,000,000 characters 12.4 s). Only SMTP TLS dates had a limit (64 characters). The function now raises ValueError for a string longer than 128 characters once comments are removed (parsedmarc.utils.MAX_TIMESTAMP_LENGTH, above any RFC 5322 date; a comment has no length limit and is not counted), and each caller turns that, and any other date that does not convert, into the matching error: InvalidFailureReport("Invalid Arrival-Date: ...") for a failure report, InvalidDMARCReport("Invalid Date header: ...") in parse_report_email(), and InvalidFailureReport from the Elasticsearch and OpenSearch failure report saves for the sample's Date. An unparseable Arrival-Date was reported as "Unexpected error" and an unparseable Date header as a plain ParserError.

    A failure sample header with an empty name is left out of the Elasticsearch and OpenSearch failure document. The save lower-cases each sample header name and replaces . with _; a header whose name was empty after that became a field with an empty name, which the cluster rejects. The header is now skipped and the sample's other headers are saved.

    A parsing worker process that dies, or a Ctrl-C, no longer leaves the run hanging or ends it in a traceback. With n_procs above 1 (or parse_timeout set) on a Python whose default start method is fork (Linux before Python 3.14), each worker inherited the SIGTERM and SIGINT handlers the CLI installs, which only note the signal. When a worker died, the process pool stopped the others with SIGTERM and waited for them, and they ignored it, so the run hung instead of failing; under the other start methods the pool's BrokenProcessPool ended the run in a traceback.

    Workers now take the default action on SIGTERM and ignore SIGINT, which the parent process handles: a Ctrl-C lets the batch in progress finish, as it does with one process. A worker that dies (the out-of-memory killer, a crash) now ends the batch with a logged error: parallel_map() raises ParserError("A parsing worker process died ...") after stopping the other workers. A one-shot run then exits with status 1, from report files, mbox files and mailboxes alike, after saving the reports parsed from report files and mbox files before the error; for a mailbox, earlier batches are saved and the batch in progress stays in the mailbox; in watch mode the IMAP and Maildir watchers log it as a warning and check the mailbox again, and the Microsoft Graph and Gmail watchers exit with status 1.

    A report file or mbox error (a worker that died, a missing mbox) no longer discards the reports already parsed from earlier files, which with archive_directory set had already been moved out of the input. Without parse_timeout, a library caller that stops reading parallel_map() early, or is interrupted, no longer waits for the jobs in progress: the workers are stopped. The systemd example in the documentation now sets KillMode=mixed, so stopping the service signals only the main process and lets the batch finish within TimeoutStopSec.

    Original source
  • All of your release notes in one feed

    Join Releasebot and get updates from domainaware and hundreds of other software products.

    Create account
  • Nov 1, 2026
    • Date parsed from source:
      Nov 1, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.2.1

    parsedmarc now refuses to send email or IMAP credentials over an unencrypted connection when STARTTLS is missing, addressing a security vulnerability. The update adds a starttls option for compatibility and requires mailsuite 2.3.4 or later.

    Security

    Credentials are no longer sent in plain text when an attacker strips STARTTLS from the SMTP or IMAP server's reply (GHSA-3588-2mr7-vrcm, affects 11.2.0 and earlier). With [smtp] ssl = False (the default; the default port is 25), email_results() opened a plain-text connection and upgraded it with STARTTLS only if the server's EHLO reply listed STARTTLS; otherwise it logged a warning and authenticated anyway. That reply arrives before any encryption, so an on-path attacker who removed STARTTLS from it received the SMTP username and password and the emailed results (CWE-319). The CLI requires [smtp] user and password whenever [smtp] host is set, so every deployment that emailed results with the default settings used this path. [imap] ssl = False (the default is True) had the same weakness: parsedmarc logged in over plain text when the server did not advertise STARTTLS.

    mailsuite 2.3.4 (GHSA-2x4j-7g3q-wr6f) now refuses a plain-text connection that was not upgraded before any credentials are sent, so the run fails with "Failed to email results" or "IMAP Error" instead. mailsuite 2.3.4 or later is now required. ssl = True (implicit TLS), the Microsoft Graph and Gmail API connections, and servers that advertise STARTTLS are unchanged.

    Compatibility: a server that offers no TLS at all now fails. Set the new [imap] or [smtp] starttls = False option to allow plain-text authentication again (recommended only for a server on the same host, such as DavMail on the loopback address; a warning is logged at startup when it is set and ssl = False), or switch to ssl = True. Library callers can pass the new starttls argument to email_results() (None by default, which requires STARTTLS before credentials are sent; True always requires it; False never upgrades). A call to email_results() without username and password still sends the message in plain text when the server does not advertise STARTTLS, with a warning. Reported by helixnebulatech.

    Original source
  • Oct 31, 2026
    • Date parsed from source:
      Oct 31, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.2.0

    parsedmarc adds Grafana Loki output and Elasticsearch/OpenSearch data stream support, while strengthening S3 report handling and credential privacy. The release also fixes failure-report saving, DNS over HTTPS compatibility, Maildir retries, and report deduplication across policy domains.

    New features

    Grafana Loki output. A new [loki] section pushes every aggregate, failure, and SMTP TLS report record as one JSON log line to the Loki push API (/loki/api/v1/push), using the same flat records as the syslog and GELF outputs plus report_type and domain. Streams are labeled job=parsedmarc and host=&lt;FQDN&gt;, overridable and extendable with labels, plus the record fields named in label_fields (default report_type, domain). Entries are timestamped at ingest by default, or at the begin of the reported period with timestamp = report_begin. Basic authentication, a bearer token, and a tenant ID (X-Scope-OrgID) are supported, and large reports are split into pushes of batch_size lines. Redirects are not followed, so a 3xx response counts as a failed push. A failed push raises LokiError, so it counts as a failed save and holds the batch's mailbox messages back for a retry. Needs only httpx, so it is part of the base install.

    Grafana dashboard for the Loki output. dashboards/grafana/Grafana-DMARC_Reports-Loki.json mirrors the PostgreSQL dashboard's layout with LogQL queries against the Loki output's lines, filtered by the domain stream label. The dashboard dev stack now runs Loki, seeds it with the sample reports, and imports the dashboard.

    Elasticsearch and OpenSearch output can now write to data streams (#842, relates to #476). The new use_data_streams option in [elasticsearch] and [opensearch] (default False) saves each report type to one data stream named like today's indexes without the date suffix (dmarc_aggregate, dmarc_failure, smtp_tls, with index_prefix, index_suffix, or the index_prefix_domain_map prefix applied as before), instead of creating an index per day or month. That gives each report type one stable name, keeps the shard count down, and lets the cluster roll over and delete old data. parsedmarc puts an index template named after each stream, whose index_patterns is the exact stream name so it never applies to the dated indexes, and creates the stream; it does not create or manage retention policies. On Elasticsearch, attach an ILM policy through an optional &lt;stream&gt;@custom component template, which the template includes; on OpenSearch, an ISM policy attaches itself through its ism_template. docs/source/elasticsearch.md and docs/source/opensearch.md have example policies. Existing dated indexes are left alone and keep matching the dashboards' dmarc_aggregate*, dmarc_f*, and smtp_tls* patterns next to the stream, and the duplicate check searches both, so a report saved before the switch is not saved again after it. monthly_indexes is ignored when use_data_streams is on, and a warning says so. If a concrete index or alias already holds a stream's name, as an undated index from a release before 5.0.0 might, saving fails with an error that says so instead of writing into it. Every saved document now also carries an @timestamp field, in both modes: each record's begin date (date_begin) for aggregate reports, which is the report's begin date unless parsedmarc split a report spanning more than a day into daily records; the arrival date for failure reports; and the report's begin date for SMTP TLS reports. These are the same dates that pick the dated index. Documents are now saved with op_type=create, which data streams require; without a document ID this is the same as the default for dated indexes.

    Security

    S3 object keys and metadata are now sanitized, and each key ends in a hash of the fields that identify the report (GHSA-7wqr-f6g9-cm29, affects 11.1.0 and earlier). S3Client.save_report_to_s3() put the sender-controlled report ID into the object key as-is, and sent org_name and the other metadata values as-is. A report ID such as ../../x added path segments to the key, an ID could carry \, %, and the other characters AWS lists as "characters to avoid", or control characters, which AWS says "might require special handling", and a long ID could push the key past the 1,024-byte limit (AWS, "Naming Amazon S3 objects"). botocore rejects non-ASCII metadata with ParamValidationError, so a report from an organization with a non-ASCII name was never saved, and its batch was held back and retried. A bare CR or LF in a metadata value made botocore raise HTTPClientError: Invalid header value before sending, which held the batch back the same way, while CR or LF followed by a space or tab (an obs-fold) was sent in the x-amz-meta-* header; the 2 KB metadata limit (AWS, "Working with object metadata") was not enforced. The key also identified a report only by its type, begin day, and report ID, so anyone who could send reports to a monitored mailbox could replace another reporter's object for that day by reusing its report ID. The report ID is now percent-encoded into a single key segment and shortened so the whole key fits in 1,024 bytes. The encoded characters are /, every AWS "character to avoid" (\ { } ^ [ ] " &lt; &gt; ~ # | and %), control characters, and non-ASCII characters, so % appears in a key only as the escape character. The punctuation real report IDs use, such as :, @, ., and _, is kept. Each metadata value is percent-encoded (%, control characters, and non-ASCII characters) so urllib.parse.unquote() reverses it, and is cut to 256 characters, which keeps the total under 2 KB. Each key now ends in _&lt;hash&gt;.json, where the hash is the first 16 hex characters of a SHA-256 hash of the report type and the fields that identify the report (for aggregate reports: organization name, report ID, policy domain, begin date, and end date; for SMTP TLS reports: organization name, report ID, begin date, end date, and each policy domain). Enrichment such as reverse DNS is not hashed, so a retried report still overwrites its own object. This narrows the overwrite but does not close it: these fields are not secret, and a forged report whose reporter name, report ID, policy domain, and dates all match a real one still replaces it. Turning on S3 Versioning on the bucket keeps both. Compatibility: every report's key changes. Objects saved by earlier versions keep their old keys and are not rewritten, and a batch that is retried across the upgrade is saved again under its new key. Reported by helixnebulatech.

    Credentials in URLs and the IPinfo API token are no longer written to the log (GHSA-hjr3-rx4c-24cv, affects 11.1.0 and earlier). The [elasticsearch] and [opensearch] hosts settings and the [splunk_hec] url setting accept URLs, and a URL can carry credentials (https://user:secret@host:9200). With --debug, the "Initializing Splunk HEC client", "Initializing Elasticsearch client", "Initializing OpenSearch client", and "Connecting to OpenSearch" lines wrote the configured value as-is, so the password went to the console and to log_file. With --verbose or --debug, parsedmarc also forwards the httpx library's HTTP Request: line, which httpx writes with the full request URL, so credentials in a webhook or Splunk HEC URL were logged on every request, as were credentials in a DNS over HTTPS URL in [general] nameservers (dnspython 2.9 and later make those requests through httpx2, which writes the same line under its own logger name), and the ipinfo_api_token was logged on every IPinfo lookup as the token query parameter. The password, or the whole userinfo when it has no :, is now replaced with *** in these lines (https://user:***@host:9200), and so is the token query value. Credentials in a [general] nameservers entry are also masked in the DNS pre-flight error, and credentials in either that setting or a --nameservers entry are masked in the --debug reverse DNS lookup errors, which quote each failing DNS over HTTPS URL, and in the error for an unusable https:// or tls:// entry, which was logged for each report that then failed to parse; such an entry, including one whose password contains an unencoded /, ?, or # (see below), is now rejected before any query is sent. The download URLs ipinfo_url, reverse_dns_map_url, and psl_overrides_url ([general]) can carry credentials too: they were logged as-is at --debug in the "Trying to fetch" lines, and when a download failed with an HTTP error status, the warning (shown with --warnings, --verbose, or --debug) included the full URL. Both are masked now: the failure warning shows the HTTP status code and the URL with the password replaced by ***. A malformed [postgresql] connection_string could put the whole connection string, or part of the password, into the output-client error logged at the default level; such errors now show a fixed message with no detail, and other PostgreSQL connection errors have URL credentials masked. The same masking applies to the URL in the "Initializing Loki client" line and in Loki push-failure errors ([loki] url, new in this release). The host and port are still logged (apart from the over-masking described below), and the credentials are still sent to the server unchanged. A password with an unencoded /, ?, or # ends the URL's authority early (RFC 3986, section 3.2), so httpx reads the text after the colon as the port and raises InvalidURL("Invalid port: 'p4ssw0rd'"), with a chained ValueError that repeats that part of the password. That text reached the log from [loki] url (at startup and on a SIGHUP reload), from [splunk_hec] url (on every batch, as "Splunk HEC Error"), from the webhook URLs (on every report, as "Webhook Error"), and from ipinfo_url (in the "Failed to save IP database" warning). A malformed psl_overrides_url crashed startup with the traceback, because InvalidURL is not an httpx.HTTPError. These now log or raise a fixed message, "(details withheld because they may include credentials)", with no chained exception. A malformed psl_overrides_url now logs a warning and falls back to the local_psl_overrides_path file when that is set, or else to the bundled file, and a malformed reverse_dns_map_url or ipinfo_url is reported as an invalid URL, not as "Not a valid CSV file" or "Failed to save IP database". Such a URL also has no @ in its authority, so the --debug "Trying to fetch" and "Initializing" lines printed it as typed; they now mask everything from the start of the authority through the last @ (https://***@host:3100). A URL with no credentials but an @ in its path or query is masked the same way in these lines (https://host/path@file is logged as https://***@file). The documentation now recommends separate credential settings instead of credentials in the URL or connection string: user and password (or api_key) for [elasticsearch] and [opensearch], user and password for [postgresql], username and password (or token) for [loki], and token for [splunk_hec]. Reported by helixnebulatech.

    mailsuite 2.3.3 or later is now required. mailsuite 2.3.3 (GHSA-9jx3-p8wm-g8vw) makes the Maildir connection return a message's stored bytes from fetch_message() and rename the file in move_message(), instead of re-serializing it. A report email that cannot be re-serialized (the GHSA-qxwv-2vwj-v828 messages) is therefore now moved to the Invalid folder on Maildir too, instead of staying in the inbox and being logged on every run.

    Bug fixes

    Failure reports are now saved to S3. save_report_to_s3() read report["report_metadata"] for every report type except SMTP TLS, but failure reports have no report_metadata (see FailureReport in parsedmarc/types.py), so every failure report raised KeyError since S3 output was added in 7.0.0. The error was counted as an S3 output error, so the batch holding the report was held back. A failure report is now saved under &lt;path&gt;/failure/year=YYYY/month=MM/day=DD/&lt;reported domain&gt;_&lt;hash&gt;.json, dated by its UTC arrival date, with reported_domain and arrival_date metadata. Its hash covers the report type, the arrival date, reported domain, original mail from, original recipient, original envelope ID, source IP address, and the message sample.

    DNS over HTTPS works again under dnspython 2.9 (#935). dnspython 2.9.0 moved DNS over HTTPS from httpx to httpx2, and dns.query.https() now raises ValueError: session parameter must be an httpx2.Client when it is given an httpx.Client. parsedmarc always passed an httpx.Client, so every https:// nameserver failed, and the resolver retried it until the lookup timed out. The shared DoH client is now built from the HTTP library dnspython itself imported: httpx2 on dnspython 2.9+, httpx on 2.7 and 2.8. The nameservers pre-flight check also reported that failure as no PTR record for 1.1.1.1, because get_reverse_dns() returns None for every DNS error. The check now queries the PTR record directly, so it reports no PTR record only when the nameserver answers that the record does not exist, and otherwise shows the resolver's actual error. The httpx2 and httpcore2 loggers are now included in --debug dependency logging, since dnspython 2.9 DoH traffic is logged under those names. An invalid dns_test_address is now reported by name in the pre-flight error. Reported by florianutz.

    Keep distinct aggregate reports when one reporter reuses a Report-ID for different policy domains. RFC 9990 §3.5.1 scopes Report-ID uniqueness to the same domain. Direct report files, mbox files, and mailbox ingestion now all include the policy domain in one shared dedup key, using a JSON array to avoid ambiguous field separators. ASCII domain case differences still count as the same domain (RFC 4343 §3), without changing the returned report. Same-domain repeats remain suppressed — including a report passed both as a file and inside an mbox in one CLI run — and mailbox keys are still committed only after a successful save callback.

    Original source
  • Oct 27, 2026
    • Date parsed from source:
      Oct 27, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.1.0

    parsedmarc hardens DMARC report processing with protection against XML and CSV injection, safer logs and filenames, more resilient mailbox handling, and consistent IP enrichment across multiprocessing modes.

    Security

    Aggregate reports containing a DOCTYPE declaration are now rejected, which fixes XML default-attribute amplification (GHSA-m47j-wp78-fqjg, affects 11.0.5 and earlier). Entity expansion was already disabled (xmltodict's disable_entities=True), but an internal DTD subset can also declare default attributes: &lt;!ATTLIST z a0 CDATA "v" ... a999 CDATA "v"&gt; followed by 10,000 &lt;z/&gt; elements makes expat report 1,000 attributes on each element, and xmltodict builds 10 million dict entries from 64 KB of XML. Locally that took 4.0 s and 1.4 GB of memory per report; the reporter measured 29 s and 1.4 GB from a 3.8 KB gzip email, and anyone who can send mail to a monitored mailbox can send it. Real aggregate reports never carry a DOCTYPE, so parse_aggregate_report_xml() now aborts with InvalidAggregateReport as soon as expat reaches one, before it reads the subset; the same document is rejected in under a millisecond. The lxml recovery path for malformed XML, which a document reaches when its first parse fails before the DOCTYPE (for example on a malformed XML declaration), applies the same check and now serializes only the root element, so no internal subset reaches the second parse. Reported by helixnebulatech.

    A report email that cannot be re-serialized no longer aborts the whole mailbox batch (GHSA-qxwv-2vwj-v828, affects 11.0.5 and earlier). While walking the message, parse_report_email() serializes the first child of each part, which re-renders any message/rfc822 sub-message, and the Maildir backend re-serializes each message while fetching it, so a message/rfc822 part with a \x1c control character in a header (email.errors.HeaderWriteError) or multiparts nested about 250 levels deep (RecursionError; a shallower nesting is rejected as not a report) raised an exception that the mailbox loop's per-message except ParserError did not catch. The batch aborted before the message could be moved to the Invalid folder, so every later run, and every watch-mode check, aborted on the same message and no report behind it was ever processed. parse_report_email() now raises only ParserError subclasses for any input. A content error raised while fetching a message (email.errors.MessageError or RecursionError) is treated like a parse failure, so the message is moved to the Invalid folder (or deleted with delete_invalid); transport errors still propagate, so a dropped connection cannot get a legitimate report filed as invalid. A move or delete of an invalid message that the backend rejects is now logged and skipped, as it already was for archiving parsed reports, instead of aborting the batch: the Maildir backend moves a message by storing it again through the binary generator, which fails for a message nested that deeply on every Python and, on interpreters whose binary generator also verifies generated headers (e.g. some distribution builds; upstream CPython verifies them only when serializing to text), for the control-character one too. Such a message stays in the inbox, logged on each run, until it is removed by hand or delete_invalid is set. get_dmarc_reports_from_mbox() now reads each message's stored bytes instead of a re-serialized string, so these messages reach the parser and fail with a ParserError naming the message rather than an unrelated exception; an mbox run still stops at such a message, as it does at any message that raises a ParserError other than InvalidDMARCReport. Reported by helixnebulatech.

    Failure report sample filenames are now limited by UTF-8 bytes as well as characters (GHSA-j53g-34vj-g25q, affects 11.0.5 and earlier). get_filename_safe_string() truncated the sample's Subject to 100 characters, but filesystems limit a name to 255 bytes (eCryptfs: 143), so a subject of 84 CJK characters or 63 emoji plus .eml made a 256-byte name. save_output() then failed with ENAMETOOLONG after the batch's JSON and CSV rows had already been appended, so a one-shot run retried the batch indefinitely and watch mode moved it, legitimate reports included, to the Unsaved folder, duplicating rows on each attempt; email_results() failed the same way. Names are now cut to at most 100 UTF-8 bytes without splitting a character, which leaves room for a (N) suffix and the extension under every common limit; ASCII names are unchanged. Reported by helixnebulatech.

    Changes

    CSV output now neutralizes spreadsheet formulas (CWE-1236, OWASP CSV Injection). Every text field in the aggregate, failure, and SMTP TLS CSV output comes from a report that a third party sent, and a cell beginning with =, +, -, or @ is evaluated as a formula by Excel, LibreOffice, and Google Sheets, so a reporter could set an org_name such as =HYPERLINK("http://evil","x") and have it run when an analyst opens the CSV. _csv_safe() now prefixes a string field that starts with =, +, -, @, a tab, or a carriage return with a single ', the OWASP-recommended fix, after the existing NUL strip; non-string values such as ASNs and counts are untouched. Compatibility: only cells starting with one of those six characters change, and real report fields almost never do. The JSON output and the data sent to the other output integrations are unchanged. (Closes #929)

    Control characters in sender-controlled strings are escaped before they reach logs and error messages. An RFC 2047 encoded word in a Subject or From header can decode to a raw CR LF (=?utf-8?q?line1=0D=0AINJECTED?=), and parse_report_email() interpolated the decoded subject into its error messages and the From header into its Parsing mail from info line, so a sender could forge extra log lines in the mailbox watch loop's warnings. The new parsedmarc.utils.sanitize_for_log() replaces every non-printable character with its unicode_escape form (\r\n, \x1b, \u2028) rather than stripping it, so the log still shows that the characters were there; the ASCII space, letters in any script, and most emoji pass through, while non-ASCII spaces such as NBSP and U+3000 and format characters such as the zero-width joiner are escaped. It is applied to the subject and From header in parse_report_email(), the SMTP TLS policy-type in its "Invalid policy type" error, the RFC 9990 np, testing, and discovery_method values and the per-record parse error that the aggregate parser logs, and the org_name and report_id in the "Skipping duplicate aggregate report" debug lines in init.py and cli.py. (Closes #929)

    Bug fixes

    Pool workers now use the IPinfo API token and IP database the parent process selected, whatever the multiprocessing start method. parsedmarc.utils keeps the IPinfo Lite REST API token (_IPINFO_API_TOKEN, set by configure_ipinfo_api()) and the selected IP database path (_IP_DB_PATH, set by load_ip_db()) in process-global variables, and only the parent process sets them. Under the fork start method (the Linux default through Python 3.13) a pool worker inherits them ("All resources of the parent are inherited by the child process", Python multiprocessing docs), but under spawn (the macOS and Windows default) and forkserver (the Linux default from Python 3.14) it does not ("The child process will only inherit those resources necessary to run the process object's run() method"). A worker there started from scratch: its IPinfo API lookups were silently skipped (_ipinfo_api_lookup() returns None when no token is set), and _get_ip_database_path() fell back to the bundled MMDB instead of the freshly downloaded or cached copy the parent had selected, so enrichment (country, ASN) could differ from what the operator configured and from the same run under fork. The CLI parses file inputs through the process pool even with -n 1 (cli.py), so every file-based CLI run on such platforms was affected. parallel_map() now snapshots both globals in the parent and restores them in every worker via its pool initializer (which previously only reconstructed logging, and is renamed _init_worker accordingly), so workers make the same IPinfo API and MMDB selections the parent configured under every start method. The module-level psl_overrides list had a smaller gap: a fresh worker loads the bundled psl_overrides.txt at import time, and only switches to the operator's psl_overrides_path or URL when its first reverse DNS map load reloads the overrides from the config, so base-domain lookups made before that load (the first aggregate report's org_name and the first source IP's reverse DNS name) used the bundled list; the pool initializer now restores the parent's list in place as well. Reported by helixnebulatech. (Closes #928)

    Original source
  • Similar to parsedmarc with recent updates:

  • Oct 22, 2026
    • Date parsed from source:
      Oct 22, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.0.5

    parsedmarc adds indexes for every PostgreSQL foreign-key column, fixing timeouts in Grafana’s Aggregate Report Details table and speeding up queries. Existing databases receive the indexes on their next startup.

    Bug fixes

    The PostgreSQL schema now indexes its foreign-key columns, so the PostgreSQL Grafana dashboard's "Aggregate Report Details" table no longer times out. PostgreSQL indexes the primary key a REFERENCES column points at, but not the referencing column itself ("the declaration of a foreign key constraint does not automatically create an index on the referencing columns", PostgreSQL docs, "Foreign Keys"), and create_tables() indexed only two of the schema's seven foreign-key columns (dmarc_aggregate_record.report_id and smtp_tls_policy.report_id). The panel looks up each record's DKIM and SPF results with a correlated subquery on dmarc_aggregate_record_dkim.record_id and dmarc_aggregate_record_spf.record_id, so every row of the panel ran two sequential scans of those tables. With 413,237 aggregate records (5.5 years of reports, PostgreSQL 16), 500 records took 46.1 s, about 92 ms each; a one-year time range of 43,568 records would have taken over an hour, and Grafana returned a 504 long before that. create_tables() now also creates idx_agg_record_dkim_record_id, idx_agg_record_spf_record_id, idx_agg_record_override_record_id, idx_failure_sample_address_report_id, and idx_smtp_tls_failure_detail_policy_id, covering every foreign-key column in the schema; the same 500 records take 15.8 ms and the one-year panel query 3.2 s. create_tables() runs on every start with CREATE INDEX IF NOT EXISTS, so existing databases get the indexes on their next start; the two largest indexes took about 0.3 s each to build on the database above, and the indexed tables reject writes until the startup DDL transaction commits.

    Original source
  • Oct 18, 2026
    • Date parsed from source:
      Oct 18, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.0.4

    parsedmarc fixes three regex performance vulnerabilities and improves timestamp parsing, preventing slowdowns on crafted messages and reports. It also corrects XML report handling and restores Grafana dashboard rows for message sources without a type.

    Security

    • Fixed catastrophic regex backtracking in the plain-text failure report fallback (GHSA-7grx-mj6g-qxmc, affects 8.2.0 through 11.0.3). A text/plain message containing A message claiming to be from you has failed is parsed as an Exim/cPanel failure notice by text_report_regex, \s*([a-zA-Z\s]+):\s(.+). Its leading \s* and the \s inside the field-name class can each consume the same whitespace, and the pattern is unanchored, so a run of whitespace is retried from every starting position and every way of splitting it: the cost grows cubically, about 8x per doubling — on CPython 3.12 (x86-64), 400 spaces took 0.06 s and 1600 spaces took 3.3 s. Anyone who can send mail to a monitored mailbox controls the body, so a message of about 100 KB would stall the mailbox watch loop for days, and since the message is never marked processed it would be re-parsed after every restart. The pattern is now anchored to the start of a line and its classes no longer overlap, so it runs in linear time. The pattern now requires a field name to start a line, with its words separated by single spaces, which is what Exim emits; notices with a tab, doubled space, or line break inside a field name were already rejected, because such names never produced the keys the parser looks up. Reported by mjatin2007.

    • Fixed quadratic regex backtracking when stripping XML schema tags from aggregate reports (GHSA-4h9r-c435-j834, affects 4.1.7 through 11.0.3). parse_aggregate_report_xml() removed <xs:schema> tags with </??xs:schema.*>, whose unanchored greedy .*> scanned to the end of the line for every <xs:schema it found, so a line of repeated <xs:schema took quadratic time — 1 MB took 19 s. The pattern runs on report attachments after gzip and zip are inflated, up to the 100 MiB decompression cap, and about 194 KB of gzip inflates to that cap. The pattern now stops at the first > (</?xs:schema[^<>]*>) and runs in linear time. This also fixes a correctness bug: on a minified report with the whole document on one line, the greedy .*> deleted everything from the schema tag to the last > on the line, discarding the report.

    Bug fixes

    • Parsing a timestamp no longer takes quadratic time on whitespace. human_timestamp_to_datetime() stripped parenthesized comments with the regex \s*\(.*\)\s*, whose leading \s* retried every whitespace run from each starting position. The function runs on every message's Date header, so a long folded header was enough: 200,000 spaces took 18.6 s. This is the same weakness as the two entries above, but a lesser one: the input is a header that mail servers cap in size (Postfix's default is 100 KB, about 5 s) rather than an attachment inflated to the 100 MiB decompression cap, so it is filed as a bug fix without an advisory. Comments are now removed by a single depth-counting pass, which is linear and also handles the nested comments and quoted-pairs that RFC 5322 section 3.2.2 allows and that the old regex only stripped by accident.

    • The Grafana dashboard's "Message sources by name and type" table no longer comes up empty when a message source has a name but no type. Whenever a source's reverse DNS base domain is not in base_reverse_dns_map.csv, get_service_from_reverse_dns_base_domain() names the source after that base domain and leaves its type None; a source with no PTR record whose AS domain is not in the map is likewise named after its AS name with no type. For every such source the saved aggregate record has a source_name but no source_type. The panel nests a terms aggregation on source_type.keyword under one on source_name.keyword, without a missing value, so such a source produced a source_name bucket with no source_type sub-bucket, and Grafana's Elasticsearch data source then failed to build the table from the response. With Grafana 13.2.4 (bundled Elasticsearch data source 12.9.2) and the reports in samples/aggregate/, 12 sources had a name but no type and the table showed "No data"; with missing set, it lists all 27 name/type rows. The source_type.keyword aggregation now sets missing to -, the placeholder most of the dashboard's other tables already use for absent values, so those sources are listed with - as their type.

    Original source
  • Sep 24, 2026
    • Date parsed from source:
      Sep 24, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.0.3

    parsedmarc fixes SMTP TLS report handling by treating blank optional failure details as absent and saving them safely across supported outputs. It also reads the RFC-standard additional-information key while retaining the legacy key as a fallback.

    Bug fixes

    An SMTP TLS (RFC 8460) failure report whose failure-details entry sends an empty string for an optional field — e.g. "sending-mta-ip": "" and "receiving-ip": "", which real reporters send for results like sts-policy-fetch-error — no longer crashes the PostgreSQL save. _parse_smtp_tls_failure_details() copied every optional field verbatim whenever the JSON key was present, so an empty string reached the PostgreSQL sending_mta_ip/receiving_ip INET columns and failed with invalid input syntax for type inet: "", discarding the whole report. The same blank values would also have crashed the Elasticsearch and OpenSearch saves: those outputs' sending_mta_ip/receiving_ip fields are IP-typed (Ip() in elastic.py/opensearch.py), and Document.save()'s validation pass rejects an empty string for an Ip() field with a bare ValueError — '' does not appear to be an IPv4 or IPv6 address — raised before any network call, so the whole report was lost rather than indexed with an empty IP. A None or blank/whitespace-only value for any optional failure-detail field (sending-mta-ip, receiving-ip, receiving-mx-hostname, receiving-mx-helo, the additional-information URI, failure-reason-code) is now treated as absent, so it is stored as NULL rather than ''. (Closes #915)

    The RFC 8460 §4.4 additional-information failure-details key is now read. The JSON Report Schema names the key additional-information (its value is described by the placeholder additional-info-uri), but the parser only read the non-RFC key additional-info-uri, so a conformant reporter's URI was silently dropped — including in the RFC's own worked example, samples/smtp_tls/rfc8460.json. The non-RFC additional-info-uri key is still read as a fallback for backward compatibility, and is used when the RFC key is absent or blank.

    Original source
  • Sep 12, 2026
    • Date parsed from source:
      Sep 12, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.0.2

    parsedmarc improves Python 3.14 compatibility, cuts Docker pulls by about 40%, and fixes file handling, CLI exits, and Elasticsearch and OpenSearch behavior during configuration reloads. Failed reloads now preserve the active setup instead of leaving services in a partial state.

    Changes

    • Upgrade the mailsuite requirement to >=2.3.2, which sets the IMAPClient version to >=4.0.0, fixing support for Python 3.14 (Closes #838)
    • The prebuilt Docker image (ghcr.io/domainaware/parsedmarc) is roughly 40% smaller to pull (#893). The runtime stage copied the built wheel out of the build stage and deleted it again at the end of the next RUN, but a RUN can only write a whiteout over a layer an earlier instruction already committed: the wheel shipped in every published image and every docker pull downloaded it (10,713,473 bytes of the 11.0.0 image, on both architectures). The wheel is now bind-mounted from the build stage instead, and a bind mount is never committed to a layer. pip install also runs with --no-cache-dir, which drops a further ~99 MB of pip's download cache that the image had been carrying in the same layer as site-packages. Measured on linux/amd64: 272,138,724 compressed bytes across six layers before, 163,757,439 across five after.
    • parse_report_file(), extract_report(), and parse_aggregate_report_file() no longer close a file object supplied by the caller, on success or failure. A path input is still opened and closed by the function, and a bytes/bytearray/memoryview input is still wrapped in an internally-created BytesIO that the function closes; but a file-like object the caller passed in may be seeked, tell()'d, or reused afterward, and closing it out from under the caller (as these functions previously did on the success path) makes that impossible. parse_aggregate_report_file() forwards its input straight to extract_report(), so it inherits the fix without changes of its own. extract_report()'s handling of a caller-supplied non-seekable stream is unaffected: its contents are still copied into an internally-owned buffer that the function closes, since that buffer was never the caller's own handle.
    • Bare exit(...) calls are now sys.exit(...) throughout the CLI and the maintainer map-tooling scripts. exit is installed into builtins by the site module, not just for interactive sessions, so it isn't guaranteed to exist under python -S or an embedded interpreter that skips site — the failure paths that called it would raise NameError instead of actually exiting. sys.exit is always available and was already used elsewhere in cli.py and find_unknown_base_reverse_dns.py. Also removed the dead, immediately-recomputed index_date stores in the Elasticsearch and OpenSearch aggregate-report savers; behavior is unchanged.

    Bug fixes

    • find_unknown_base_reverse_dns.py's missing-file checks for base_reverse_dns_map.csv and the known_unknown/PSL-override lists printed a clean error message but fell through into an unhandled FileNotFoundError traceback instead of exiting.
    • parse_report_file() now closes the file handle it opens itself for a path input if reading it raises. When input_ is a path, the function opened the file, read it, and closed it with no exception handling in between; an exception raised by read() (e.g. an OSError from the underlying storage) skipped the close, so the descriptor was left to be released only when Python's garbage collector eventually finalized the object — CPython's io.IOBase.del closes an unclosed file on finalization (https://docs.python.org/3/library/io.html) — rather than being closed deterministically. This is the pattern CodeQL's py/file-not-closed query flags, found in a local code-quality scan. The path branch now opens the file with a with block, so the handle is closed on both the success and exception paths. (A caller-supplied file-like object's closing behavior changed again later in this same Unreleased version — see the Changes section above.)
    • A SIGHUP configuration reload no longer breaks every subsequent save to Elasticsearch or OpenSearch. With [elasticsearch] or [opensearch] configured in watch mode, reloading the configuration re-registered the search client under the client library's default connection alias and then closed the previous run's clients. The close step re-resolved that alias instead of remembering the client it was created for, so it closed the newly built client and deleted the default alias outright — after which every report save failed with KeyError: "There is no connection with alias 'default'." until parsedmarc was restarted, and the original client was left open. Each backend's handle now closes the exact client it was created for and gives up the alias only while the alias still points at that client. Both the Elasticsearch and OpenSearch backends were affected.
    • A configuration reload that fails part-way no longer leaves reports being written to the new Elasticsearch or OpenSearch hosts under the old configuration. The search client is registered under the client library's process-wide default connection alias as soon as it is constructed — before the index migration runs, and before the outputs configured after it are created. When a later step then failed on a SIGHUP reload — for example an [opensearch] section that cannot build its client (an unsupported auth_type, awssigv4 without an aws_region, AWS credentials that will not load) — parsedmarc logged Config reload failed, continuing with previous config and kept the old configuration. But the alias had already been handed to the new client, so every subsequent save resolved it to the new hosts while the index prefixes, suffixes, and index_prefix_domain_map still came from the old configuration. Reports were silently written to a destination that was never successfully configured, with the log saying nothing had changed. The half-built client was never closed either, nor were the other clients (S3, Kafka, PostgreSQL, and so on) built earlier in the same failed reload — the same leak occurred on every attempt of the startup retry loop, which calls the same function. Building the output clients is now all-or-nothing: if any step fails, everything built so far is closed and the module-level state the search backends keep is put back — each configured backend's default alias restored to exactly the client it named beforehand, and the Elasticsearch serverless flag (which decides whether number_of_shards/number_of_replicas are sent when an index is created) to its old value — so a failed reload no longer changes where reports are written, or how indexes are created.
    • A SIGHUP configuration reload that fails after the replacement output clients are built now really does keep the previous configuration, instead of leaving the new clients live and the old ones closed. The reload built the replacement clients, then immediately closed the old ones and swapped them in — and only afterwards reloaded the reverse DNS map and the PSL overrides, reloaded the IP database, re-applied the IPinfo API token, copied the new values onto opts, rebuilt the ParserConfig, and converted the watch parameters. A failure in any of those (a typo in local_reverse_dns_map_path or local_psl_overrides_path, an unreadable map or overrides file, an IP database that cannot be resolved) was caught and logged as Config reload failed, continuing with previous config, which was not true: the new output clients were already receiving every report, the old clients were closed and could not be brought back, opts could be half-applied, and load_reverse_dns_map()/load_psl_overrides() — both of which empty their target before reading anything — had left one of the two empty. A bad map path emptied the reverse DNS map, so reverse DNS lookups stopped resolving to known services until some later uncached lookup happened to refill the map from the previous configuration's paths (get_service_from_reverse_dns_base_domain() and get_ip_address_info() both reload a map they find empty). A bad PSL overrides path emptied the override list without ever touching the map, so nothing triggered that lazy reload and base domains were folded without the overrides until parsedmarc was restarted. The whole reload is now staged before anything live is touched: the map is loaded into a fresh dict, the parsedmarc.utils globals the loaders assign are snapshotted, the replacement log_file is opened during staging, and the commit is a run of plain assignments followed by the logging refresh, whose one remaining failure point — closing the replaced log file — is caught and logged rather than allowed to abort a reload that is already live. A log_file that cannot be opened now aborts the reload with the previous log file still attached and still receiving logs; previously the old handler had already been removed, the failed open was only a warning, file logging stayed dead, and a later reload of the same path was a no-op that never retried it. Relatedly, a log_file that could not be opened at startup — a warning there, since there is no previous configuration to keep — is now retried by the next reload even when the setting is unchanged; startup used to record the unopened file as the active one, so the reload saw nothing to do. On failure the replacement clients are closed, the log file opened for the reload is closed (best-effort, so a close error cannot skip the restores that follow it), the search backends' default connection alias is handed back to the old client, and the utils globals are restored, so the log message is accurate. The clients the reload replaces are now closed last, after the new configuration is live, and a failure to close one is logged without disturbing the reload. #906 fixed the other half of this — building the clients themselves is all-or-nothing.
    Original source
  • Sep 3, 2026
    • Date parsed from source:
      Sep 3, 2026
    • First seen by Releasebot:
      Nov 25, 2026
    • Modified by Releasebot:
      Nov 25, 2026
    domainaware logo

    parsedmarc by domainaware

    11.0.1

    parsedmarc fixes path traversal and unbounded decompression risks in report handling, and prevents CSV output failures caused by NUL characters in untrusted report fields.

    Security

    Fixed a path traversal in the failure report sample filenames written by --output (GHSA-c284-w5m6-jhjm, affects 9.0.6 through 11.0.0). save_output() named each failure report's message sample after the sample's Subject header, falling back to the raw, unsanitized subject whenever sanitizing it produced an empty string. A subject consisting only of path separators and dots — ../../../ or / — sanitizes to nothing, so the raw value reached os.path.join() and the .eml file was written outside the samples directory, or at an absolute path. The subject comes from a message that failed authentication, so anyone who can send mail to a monitored mailbox controls it. The filename is now sanitized at write time and falls back to sample, and the filename_safe_subject key that a library caller may supply alongside the subject is no longer trusted.

    Fixed unbounded decompression of report attachments (GHSA-43qf-f35w-2x4r, affects all versions through 11.0.0). extract_report() inflated gzip and zip attachments with no limit on the output size. The attachment's content is chosen by whoever sent it, and deflate reaches compression ratios of about 1000:1 on degenerate input, so a 100 KB attachment from any sender a monitored mailbox accepts inflated to 100 MB, with a peak of about twice that. Extraction now stops at 100 MiB of decompressed data and raises ParserError. The limit is deliberately not configurable: real DMARC aggregate, failure, and SMTP TLS reports are orders of magnitude smaller.

    Bug fixes

    CSV output (failure.csv, and the other CSV renderers) no longer raises _csv.Error on Python 3.10 when a report field contains a NUL character. Python 3.10's csv writer rejects any field containing NUL unless an escapechar is set (CPython issue 97503, a 3.10 regression fixed in 3.11+). Failure report text fields (subject, user agent, authentication results, addresses, and more) come from untrusted mail, so a NUL byte anywhere in one made parsed_failure_reports_to_csv() — and therefore save_output() — raise on 3.10, uncaught by the CLI's except (OSError, ValueError) around save_output. The character is now stripped from CSV fields on every Python version, matching the sanitizing already applied to sample filenames.

    Original source

This is the end. You've seen all the release notes in this feed!

Releasebot

Curated by the Releasebot team

Releasebot is an aggregator of official product update announcements from hundreds of software vendors and thousands of sources.

Our editorial process involves the manual review and audit of release notes procured with the help of automated systems.