CVE-2021-44549 SMTPS server hostname not checked when making TLS connection to SMTPS server
The library fails to verify SMTPS server identity by default, allowing man-in-the-middle attacks unless explicitly configured or upgraded.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-44549?
CVE-2021-44549 is a high-severity vulnerability in Apache Sling Commons Messaging Mail, published on 14 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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
Weakness: CWE-295
Which versions are affected by CVE-2021-44549?
2 open source packages ship an affected version, including org.apache.sling:org.apache.sling.commons.messaging.mail. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.sling:org.apache.sling.commons.messaging.mail Maven | All versions | 2.0 |
org.apache.sling:org.apache.sling.commons.messaging.mail Maven | All versions | 2.0 |
Products include Apache Sling Commons Messaging Mail.
How do I fix CVE-2021-44549?
Upgrade org.apache.sling:org.apache.sling.commons.messaging.mail to 2.0 or later.
Is CVE-2021-44549 being exploited?
There is no known exploitation of CVE-2021-44549 in the wild and no public exploit code.
Sources
Also known as GHSA-c69w-jj56-834w.