CVE-2021-44549 — org.apache.sling.commons.…
HIGHCVE-2021-44549 is a high-severity (CVSS 7.4) CWE-295 vulnerability in org.apache.sling:org.apache.sling.commons.messaging.mail. A fix is available for org.apache.sling:org.apache.sling.commons.messaging.mail — see the affected versions and patch details below.
Improper Certificate Validation and Improper Validation of Certificate with Host Mismatch in Apache Sling Commons Messaging Mail
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-44549 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,987 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.apache.sling:org.apache.sling.commons.messaging.mailReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.sling:org.apache.sling.commons.messaging.mail | all versions | 2.0org.apache.sling:org.apache.sling.commons.messaging.mail:2.0 |
Affected Products
sling commons messaging mailapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.sling:org.apache.sling.commons.messaging.mail, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.sling:org.apache.sling.commons.messaging.mail to 2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-44549 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability should be considered of important severity rather than moderate because it directly impacts the integrity and confidentiality of email communications over SMTPS. By disabling server identity checks, it leaves the communication channel vulnerable to "man-in-the-middle" (MITM) attacks, where an…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2021-44549 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| OCP-Tools-4.12-RHEL-8 | jenkins-0:2.462.3.1730119132-3.el8 | RHSA-2024:8886 |
| OCP-Tools-4.13-RHEL-8 | jenkins-0:2.462.3.1729839924-3.el8 | RHSA-2024:8887 |
| OCP-Tools-4.14-RHEL-8 | jenkins-0:2.462.3.1729839727-3.el8 | RHSA-2024:8885 |
| OCP-Tools-4.15-RHEL-8 | jenkins-0:2.462.3.1729837947-3.el8 | RHSA-2024:8884 |
| Red Hat build of Quarkus 3.2 | angus-mail | RHSA-2024:7676 |
| Red Hat build of Quarkus 3.8 | see advisory | RHSA-2024:7670 |
Frequently Asked Questions
Is CVE-2021-44549 in your dependencies?
Find it across Maven, including transitive dependencies.