CVE-2023-51764: Medium severity Postfix Postfix vulnerability
Last updated 24 July 2024
Other sources
Postfix through 3.8.5 allows SMTP smuggling unless configured with smtpddatarestrictions=rejectunauthpipelining and smtpddiscardehlokeywords=chunking (or certain other options that exist in recent versions). Remote attackers can use a published exploitation technique to inject e-mail messages with a spoofed MAIL FROM address, allowing bypass of an SPF protection mechanism. This occurs because Postfix supports <LF>.<CR><LF> but some other popular e-mail servers do not. To prevent attack variants (by always disallowing <LF> without <CR>), a different solution is required, such as the smtpdforbidbarenewline=yes option with a Postfix minimum version of 3.5.23, 3.6.13, 3.7.9, 3.8.4, or 3.9.
— Launchpad
Summary: Depending on how SMTP servers/software are configured to interpret the end-of-data sequence (e.g., <CR><LF>.<CR><LF>), an attacker can break out of the message data to "smuggle" SMTP commands to send spoofed emails that pass SPF checks.
Description: By exploiting interpretation differences of the SMTP protocol, it is possible to smuggle/send spoofed e-mails - hence SMTP smuggling - while still passing SPF alignment checks. During this research, two types of SMTP smuggling, outbound and inbound, were discovered. These allowed sending spoofed e-mails from millions of domains (e.g., admin[@]outlook.com) to millions of receiving SMTP servers (e.g., Amazon, PayPal, eBay). Identified vulnerabilities in Microsoft and GMX were quickly fixed, however, SEC Consult urges companies using the also affected Cisco Secure Email product to manually update their vulnerable default configuration.
References: https://sec-consult.com/blog/detail/smtp-smuggling-spoofing-e-mails-worldwide/ https://www.mail-archive.com/postfix-users@postfix.org/msg100901.html https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059230
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/postfixto a version that resolves this vulnerability.Fixed in 3.8.4-1Fixed in 3.7.9-0+deb12u1Fixed in 3.5.23-0+deb11u1 - Upgrade
Upgrade
redhat/postfixto a version that resolves this vulnerability.Fixed in 3.8.4 - Upgrade
Upgrade
redhat/postfixto a version that resolves this vulnerability.Fixed in 3.7.9 - Upgrade
Upgrade
redhat/postfixto a version that resolves this vulnerability.Fixed in 3.6.13 - Upgrade
Upgrade
redhat/postfixto a version that resolves this vulnerability.Fixed in 3.5.23 - Upgrade
Upgrade
debian/postfixto a version that resolves this vulnerability.Fixed in 3.5.25-0+deb11u1Fixed in 3.7.11-0+deb12u1Fixed in 3.10.5-1~deb13u1Fixed in 3.10.6-1 - Upgrade
Upgrade
Postfixto a version that resolves this vulnerability.Fixed in 3.5.23 - Upgrade
Upgrade
Postfixto a version that resolves this vulnerability.Fixed in 3.6.13 - Upgrade
Upgrade
Postfixto a version that resolves this vulnerability.Fixed in 3.7.9 - Upgrade
Upgrade
Postfixto a version that resolves this vulnerability.Fixed in 3.8.4 - Upgrade
Upgrade
Postfixto a version that resolves this vulnerability.Fixed in 3.9 - Configuration
Set Postfix parameter smtpd_forbid_bare_newline = normalize to prevent SMTP smuggling variants that exploit <LF>.<CR><LF> interpretation differences. Apply alongside patched versions noted below.
Postfix smtpd_forbid_bare_newline = normalize - Configuration
Set smtpd_forbid_bare_newline_exclusions = $mynetworks in Postfix so that bare-newline normalization exclusions apply to $mynetworks as specified in the fix instructions.
Postfix smtpd_forbid_bare_newline_exclusions = $mynetworks
Event History
Frequently Asked Questions
What is the severity of CVE-2023-51764?
CVE-2023-51764 is considered a medium severity vulnerability due to the potential for SMTP smuggling attacks.
How do I fix CVE-2023-51764?
To mitigate CVE-2023-51764, configure Postfix with smtpd_data_restrictions set to reject_unauth_pipelining and smtpd_discard_ehlo_keywords set to chunking.
What versions of Postfix are affected by CVE-2023-51764?
CVE-2023-51764 affects Postfix versions up to and including 3.8.5.
Can CVE-2023-51764 be exploited remotely?
Yes, CVE-2023-51764 allows remote attackers to exploit the vulnerability using established techniques.
What impact does CVE-2023-51764 have on SMTP security?
CVE-2023-51764 can compromise SMTP security by allowing unauthorized access and potential email spoofing through manipulation of the SMTP protocol.