CVE-2021-44549

SMTPS server hostname not checked when making TLS connection to SMTPS server

Description

Apache Sling Commons Messaging Mail provides a simple layer on top of JavaMail/Jakarta Mail for OSGi to send mails via SMTPS. To reduce the risk of "man in the middle" attacks additional server identity checks must be performed when accessing mail servers. For compatibility reasons these additional checks are disabled by default in JavaMail/Jakarta Mail. The SimpleMailService in Apache Sling Commons Messaging Mail 1.0 lacks an option to enable these checks for the shared mail session. A user could enable these checks nevertheless by accessing the session via the message created by SimpleMessageBuilder and setting the property mail.smtps.ssl.checkserveridentity to true. Apache Sling Commons Messaging Mail 2.0 adds support for enabling server identity checks and these checks are enabled by default. - https://javaee.github.io/javamail/docs/SSLNOTES.txt - https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html - https://github.com/eclipse-ee4j/mail/issues/429

Remediation

Workaround:

  • Set the property mail.smtps.ssl.checkserveridentity to true via message's session.

Category

7.4
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.22%
Vendor Advisory apache.org
Affected: Apache Software Foundation Apache Sling Commons Messaging Mail
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2021-44549?
CVE-2021-44549 has been scored as a high severity vulnerability.
How to fix CVE-2021-44549?
As a workaround for remediating CVE-2021-44549: Set the property mail.smtps.ssl.checkserveridentity to true via message's session.
Is CVE-2021-44549 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2021-44549 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-44549?
CVE-2021-44549 affects Apache Software Foundation Apache Sling Commons Messaging Mail.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.