Vulnerability · Published Dec 14, 2021 · Assigned by apache

CVE-2021-44549SMTPS server hostname not checked when making TLS connection to SMTPS server

High 7.4

In plain English

A high-severity improper certificate validation in Apache Sling Commons Messaging Mail from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)7.4High
Exploit odds (30 days)2.1%top 18.4% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Mavenorg.apache.sling:org.apache.sling.commons.messaging.mail2.0GHSA-c69w-jj56-834w

Affected products (as reported)

VendorProductVersions
Apache Software Foundation Apache Sling Commons Messaging Mail Apache Sling Commons Messaging Mail 1.0.0 1.0.0

Weakness: CWE-295

References