Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-101281 Overview
CVE-2026-101281 is an improper authentication vulnerability [CWE-287] in the Trusted Domain Project OpenDMARC library, affecting versions up to 1.4.2. The flaw resides in the opendmarc_spf2_find_mailfrom_domain function within libopendmarc/opendmarc_spf.c, part of the SPF Macro Handler component. The vulnerability allows remote attackers to influence Sender Policy Framework (SPF) evaluation logic through crafted input, undermining DMARC-based email authentication decisions. A public exploit reference has been published, and the maintainers have released patch c48a74c758677fc5272a73eff15ffdbf8afda1a6 to correct the issue.
Critical Impact
Successful exploitation weakens SPF/DMARC authentication for inbound mail, enabling spoofed messages to pass validation and reach recipients.
Affected Products
- Trusted Domain Project OpenDMARC versions up to and including 1.4.2
- Mail transport agents (MTAs) integrating OpenDMARC via the libopendmarc shared library
- Downstream Linux distribution packages bundling vulnerable OpenDMARC builds
Discovery Timeline
- 2026-09-29 - CVE-2026-101281 published to NVD
- 2026-09-29 - Last updated in NVD database
Technical Details for CVE-2026-101281
Vulnerability Analysis
OpenDMARC delegates SPF evaluation to libspf2 and constructs the query using values derived from the SMTP HELO/EHLO hostname and the MAIL FROM envelope sender. The vulnerable code path in opendmarc_spf2_find_mailfrom_domain set the HELO domain as the SPF check target when the MAIL FROM domain lookup failed or was unused. This caused SPF to evaluate against the HELO identity rather than the envelope sender, and it also mishandled the ordering of SPF_request_set_env_from and SPF_request_set_helo_dom calls.
Because certain libspf2 versions treat the first-set domain as the authoritative check domain, an attacker able to control the HELO hostname could redirect the SPF verdict away from the true envelope sender. Macro expansion of %{h} further compounded the problem by exposing HELO-derived values to policy evaluation. The end result is that a message can obtain an SPF pass verdict for a domain the sender does not legitimately represent, which then produces an incorrect DMARC alignment outcome.
Root Cause
The root cause is incorrect conditional logic and call ordering in the SPF request preparation. The pre-patch code invoked SPF_request_set_helo_dom on the failure branch and SPF_request_set_env_from on the success branch, but it did not consistently establish the envelope sender first. This allowed HELO-controlled values to override the intended MAIL FROM check domain.
Attack Vector
Exploitation is remote and requires no authentication. An attacker connects to a receiving MTA that uses OpenDMARC, negotiates an SMTP session, and supplies crafted HELO and MAIL FROM values designed to manipulate the SPF check domain. When OpenDMARC evaluates the message, SPF returns a result that does not reflect the true origin, allowing forged mail to satisfy DMARC policy checks at the recipient boundary.
// Source: https://github.com/trusteddomainproject/OpenDMARC/commit/c48a74c758677fc5272a73eff15ffdbf8afda1a6
// Patch in libopendmarc/opendmarc_spf.c fixing issue #262 via PR #328
ret = opendmarc_spf2_find_mailfrom_domain(ctx, mail_from_domain, mfrom, sizeof mfrom, used_mfrom);
- if (ret != 0 || *used_mfrom == FALSE)
+ if (ret == 0 && *used_mfrom == TRUE)
{
- (void) strlcpy(helo, helo_domain, sizeof helo);
- SPF_request_set_helo_dom(ctx->spf_request, helo);
+ /*
+ * Set env_from before helo_dom: some libspf2 versions use the
+ * first-set domain as the check domain, so env_from must be
+ * established first. helo_dom is then available for %{h} macro
+ * expansion without redirecting the check to the HELO hostname.
+ */
+ SPF_request_set_env_from(ctx->spf_request, mfrom);
+ if (helo_domain != NULL)
+ {
+ (void) strlcpy(helo, helo_domain, sizeof helo);
+ SPF_request_set_helo_dom(ctx->spf_request, helo);
+ }
}
- else
+ else if (helo_domain != NULL)
{
- SPF_request_set_env_from(ctx->spf_request, mfrom);
+ (void) strlcpy(helo, helo_domain, sizeof helo);
+ SPF_request_set_helo_dom(ctx->spf_request, helo);
}
ctx->spf_response = NULL;
SPF_request_query_mailfrom(ctx->spf_request, &(ctx->spf_response));
The patch reorders the calls so SPF_request_set_env_from runs first when the MAIL FROM domain is valid, and it conditionally sets the HELO domain only when appropriate. Additional context is available in the OpenDMARC Issue #262 Discussion and the Xuyongzhe Blog on OpenDMARC SPF.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-101281
Indicators of Compromise
- Inbound mail where the SPF pass result was recorded against the HELO domain rather than the MAIL FROM domain in Authentication-Results headers.
- OpenDMARC log entries showing SPF alignment success for messages whose envelope sender differs from the domain that was actually evaluated.
- Spikes in DMARC pass verdicts for domains that historically fail alignment, especially from unexpected sending infrastructure.
Detection Strategies
- Parse Authentication-Results headers on ingested mail and flag mismatches between the SPF-evaluated identity and the RFC5321.MailFrom domain.
- Correlate DMARC aggregate (rua) reports against internal MTA logs to identify messages that passed alignment through HELO-based evaluation.
- Inventory hosts running OpenDMARC and compare installed versions against 1.4.2 or earlier, prioritizing internet-facing MTAs.
Monitoring Recommendations
- Enable verbose OpenDMARC logging and forward mail authentication events to a centralized analytics platform for retention and search.
- Alert on sudden increases in DMARC pass rates for high-value brand domains, which can indicate authentication bypass attempts.
- Track SMTP sessions where HELO identities do not resolve to the connecting IP and combine that signal with SPF verdict data.
How to Mitigate CVE-2026-101281
Immediate Actions Required
- Apply commit c48a74c758677fc5272a73eff15ffdbf8afda1a6 or upgrade to a fixed OpenDMARC release once packaged by your distribution.
- Audit MTA fleets for any host running OpenDMARC 1.4.2 or earlier and schedule patching based on internet exposure.
- Review recent DMARC pass verdicts for lookalike or spoofed sender domains and quarantine suspicious messages.
Patch Information
The fix was merged via OpenDMARC Pull Request #328 and is available in the upstream GitHub Commit for OpenDMARC. Additional vulnerability metadata is tracked in the VulDB CVE-2026-101281 Entry. Rebuild libopendmarc from source or install a distribution package that incorporates the patch, then restart the OpenDMARC milter service.
Workarounds
- Enforce stricter DMARC policy handling downstream by requiring SPF alignment on the RFC5321.MailFrom domain rather than accepting HELO-based results.
- Add SMTP-level checks that reject sessions presenting HELO hostnames not matching the connecting client's forward and reverse DNS.
- Temporarily disable SPF macro expansion features in dependent policy engines if patching cannot be completed immediately.
# Verify installed OpenDMARC version and rebuild from patched source
opendmarc -V
git clone https://github.com/trusteddomainproject/OpenDMARC.git
cd OpenDMARC
git checkout c48a74c758677fc5272a73eff15ffdbf8afda1a6
autoreconf -fiv
./configure --prefix=/usr/local
make && sudo make install
sudo systemctl restart opendmarc
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

