CVE-2020-2252: Mailer Improper Validation Of Certificate With Vulnerability

MODERATE
Advisory Identifier: GHSA-6fr3-286q-q3cr
CVSS 4.8
CWE-295
Published
Advisory Summary

CVE-2020-2252 is a MODERATE (CVSS 4.8) improper validation of certificate with vulnerability (CWE-295: Improper Certificate Validation) affecting Mailer libraries in the Maven ecosystem. The issue involves improper validation of certificate with host mismatch in jenkins mailer plugin. Remediation is available by upgrading affected packages to version 1.32.1, 1.31.1, 1.29.1.

CVE-2020-2252 at a Glance

CVE Identifier CVE-2020-2252
GHSA Identifier GHSA-6fr3-286q-q3cr
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Mailer
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-2252

To remediate this vulnerability, upgrade all affected Mailer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.jenkins-ci.plugins:mailer fixed: 1.32.1
<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>mailer</artifactId>
    <version>1.32.1</version>
</dependency>
org.jenkins-ci.plugins:mailer fixed: 1.31.1
<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>mailer</artifactId>
    <version>1.31.1</version>
</dependency>
org.jenkins-ci.plugins:mailer fixed: 1.29.1
<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>mailer</artifactId>
    <version>1.29.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.jenkins-ci.plugins

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-2252, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.jenkins-ci.plugins

Analyze the terminal output to locate any version of Mailer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.32.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.jenkins-ci.plugins command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Mailer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Jenkins Mailer Plugin prior to 1.32.1, 1.31.1, and 1.29.1 does not perform hostname validation when connecting to the configured SMTP server. This lack of validation could be abused using a man-in-the-middle attack to intercept these connections. Mailer Plugin 1.32.1, 1.31.1, and 1.29.1 validates the SMTP hostname when connecting via TLS by default. In Mailer Plugin 1.32 and earlier, administrators can set the Java system property mail.smtp.ssl.checkserveridentity to true on startup to enable this protection. In case of problems, this protection can be disabled again by setting the Java system property mail.smtp.ssl.checkserveridentity to false on startup.

CVE-2020-2252 Affected Mailer Versions

3 component(s)
Fixed Versions:
1.32.11.31.11.29.1
Product / Package Ecosystem Affected Versions Fixed Version
org.jenkins-ci.plugins:mailer
Maven
≥ 1.32
< 1.32.1
All 1 versions
1.32
1.32.1
org.jenkins-ci.plugins:mailer
Maven
≥ 1.30
< 1.31.1
1.31.1
org.jenkins-ci.plugins:mailer
Maven
< 1.29.1
1.29.1

References

Frequently Asked Questions

What is CVE-2020-2252?
CVE-2020-2252 is a security vulnerability in Mailer involving Improper Validation of Certificate with Host Mismatch in Jenkins Mailer Plugin under CWE-295: Improper Certificate Validation.
Which Mailer versions are affected?
Affected versions include releases prior to 1.32.1, 1.31.1, 1.29.1 across affected packages: org.jenkins-ci.plugins:mailer.
What version fixes CVE-2020-2252?
Upgrading to 1.32.1, 1.31.1, 1.29.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mailer affected?
Yes, org.jenkins-ci.plugins:mailer is affected in releases prior to 1.32.1, 1.31.1, 1.29.1. Upgrade your dependency to 1.32.1, 1.31.1, 1.29.1 or later.
What is the CVSS score of CVE-2020-2252?
CVE-2020-2252 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2020-2252?
CVE-2020-2252 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check Maven dependencies for CVE-2020-2252?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jenkins-ci.plugins'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6fr3-286q-q3cr",
  "modified" : "2023-05-23T20:56:20Z",
  "published" : "2022-05-24T17:28:25Z",
  "aliases" : [ "CVE-2020-2252" ],
  "summary" : "Improper Validation of Certificate with Host Mismatch in Jenkins Mailer Plugin",
  "details" : "Jenkins Mailer Plugin prior to 1.32.1, 1.31.1, and 1.29.1 does not perform hostname validation when connecting to the configured SMTP server. This lack of validation could be abused using a man-in-the-middle attack to intercept these connections.\n\nMailer Plugin 1.32.1, 1.31.1, and 1.29.1 validates the SMTP hostname when connecting via TLS by default. In Mailer Plugin 1.32 and earlier, administrators can set the Java system property mail.smtp.ssl.checkserveridentity to true on startup to enable this protection.\n\nIn case of problems, this protection can be disabled again by setting the Java system property mail.smtp.ssl.checkserveridentity to false on startup.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.plugins:mailer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.32"
      }, {
        "fixed" : "1.32.1"
      } ]
    } ],
    "versions" : [ "1.32" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.plugins:mailer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.30"
      }, {
        "fixed" : "1.31.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jenkins-ci.plugins:mailer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.29.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-2252"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jenkinsci/mailer-plugin/commit/e1893c6d105669f134ee5c5212ef9f3944d7d00d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/CVEProject/cvelist/blob/16860a328d970faa6e4350b0fa446f64a52e52ca/2020/2xxx/CVE-2020-2252.json"
  }, {
    "type" : "WEB",
    "url" : "https://www.jenkins.io/security/advisory/2020-09-16/#SECURITY-1813"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/09/16/3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-23T23:19:44Z",
    "nvd_published_at" : "2020-09-16T14:15:00Z"
  }
}