CVE-2019-12423: Apache cxf Private Key Leak Vulnerability

HIGH
Advisory Identifier: GHSA-42f2-f9vc-6365
CVSS 7.5
CWE-522
Published
Advisory Summary

CVE-2019-12423 is a HIGH (CVSS 7.5) private key leak vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Apache cxf libraries in the Maven ecosystem. The issue involves private key leak in apache cxf. Remediation is available by upgrading affected packages to version 3.2.12, 3.3.5.

CVE-2019-12423 at a Glance

CVE Identifier CVE-2019-12423
GHSA Identifier GHSA-42f2-f9vc-6365
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Apache cxf
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2019-12423

To remediate this vulnerability, upgrade all affected Apache cxf 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.apache.cxf:apache-cxf fixed: 3.2.12
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>apache-cxf</artifactId>
    <version>3.2.12</version>
</dependency>
org.apache.cxf:apache-cxf fixed: 3.3.5
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>apache-cxf</artifactId>
    <version>3.3.5</version>
</dependency>
org.apache.cxf:cxf fixed: 3.2.12
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf</artifactId>
    <version>3.2.12</version>
</dependency>
org.apache.cxf:cxf fixed: 3.3.5
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf</artifactId>
    <version>3.3.5</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.apache.cxf

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.cxf

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

Note: The mvn dependency:tree -Dincludes=org.apache.cxf 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-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Apache cxf, 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

Apache CXF ships with a OpenId Connect JWK Keys service, which allows a client to obtain the public keys in JWK format, which can then be used to verify the signature of tokens issued by the service. Typically, the service obtains the public key from a local keystore (JKS/PKCS12) by specifing the path of the keystore and the alias of the keystore entry. This case is not vulnerable. However it is also possible to obtain the keys from a JWK keystore file, by setting the configuration parameter `rs.security.keystore.type` to `jwk`. For this case all keys are returned in this file &quot;as is&quot;, including all private key and secret key credentials. This is an obvious security risk if the user has configured the signature keystore file with private or secret key credentials. From CXF 3.3.5 and 3.2.12, it is mandatory to specify an alias corresponding to the id of the key in the JWK file, and only this key is returned. In addition, any private key information is omitted by default. `oct` keys, which contain secret keys, are not returned at all.

CVE-2019-12423 Affected Apache cxf Versions

4 component(s)
Fixed Versions:
3.2.123.3.5
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.cxf:apache-cxf
Maven
< 3.2.12
3.2.12
org.apache.cxf:apache-cxf
Maven
≥ 3.3.0
< 3.3.5
3.3.5
org.apache.cxf:cxf
Maven
< 3.2.12
3.2.12
org.apache.cxf:cxf
Maven
≥ 3.3.0
< 3.3.5
3.3.5

References

NVD — CVE-2019-12423 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-12423
lists.apache.org/thread.html/r36e44f... WEB
https://lists.apache.org/thread.html/r36e44ffc1a9b365327df62cdfaabe85b9a5637de102cea07d79b2dbf@%3Ccommits.cxf.apache.org%3E
lists.apache.org/thread.html/rd49aab... WEB
https://lists.apache.org/thread.html/rd49aabd984ed540c8ff7916d4d79405f3fa311d2fdbcf9ed307839a6@%3Ccommits.cxf.apache.org%3E
lists.apache.org/thread.html/rd588ff... WEB
https://lists.apache.org/thread.html/rd588ff96f18563aeb5f87ac8c6bce7aae86cb1a4d4be483f96e7208c@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/rec7160... WEB
https://lists.apache.org/thread.html/rec7160382badd3ef4ad017a22f64a266c7188b9ba71394f0d321e2d4@%3Ccommits.cxf.apache.org%3E
lists.apache.org/thread.html/rfb87e0... WEB
https://lists.apache.org/thread.html/rfb87e0bf3995e7d560afeed750fac9329ff5f1ad49da365129b7f89e@%3Ccommits.cxf.apache.org%3E
lists.apache.org/thread.html/rff42cf... WEB
https://lists.apache.org/thread.html/rff42cfa5e7d75b7c1af0e37589140a8f1999e578a75738740b244bd4@%3Ccommits.cxf.apache.org%3E
Apache cxf Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
Apache cxf Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html
Apache cxf Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2020.html
Apache cxf Security Information SECURITY
http://cxf.apache.org/security-advisories.data/CVE-2019-12423.txt.asc?version=1&modificationDate=1579178393000&api=v2

Frequently Asked Questions

What is CVE-2019-12423?
CVE-2019-12423 is a security vulnerability in Apache cxf involving Private key leak in Apache CXF under CWE-522: Insufficiently Protected Credentials.
Which Apache cxf versions are affected?
Affected versions include releases prior to 3.2.12, 3.3.5 across affected packages: org.apache.cxf:apache-cxf, org.apache.cxf:cxf.
What version fixes CVE-2019-12423?
Upgrading to 3.2.12, 3.3.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-cxf affected?
Yes, org.apache.cxf:apache-cxf is affected in releases prior to 3.2.12, 3.3.5. Upgrade your dependency to 3.2.12, 3.3.5 or later.
Is cxf affected?
Yes, org.apache.cxf:cxf is affected in releases prior to 3.2.12, 3.3.5. Upgrade your dependency to 3.2.12, 3.3.5 or later.
What is the CVSS score of CVE-2019-12423?
CVE-2019-12423 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2019-12423?
CVE-2019-12423 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check Maven dependencies for CVE-2019-12423?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.cxf'. 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-42f2-f9vc-6365",
  "modified" : "2021-06-15T17:26:32Z",
  "published" : "2020-05-22T19:23:04Z",
  "aliases" : [ "CVE-2019-12423" ],
  "summary" : "Private key leak in Apache CXF",
  "details" : "Apache CXF ships with a OpenId Connect JWK Keys service, which allows a client to obtain the public keys in JWK format, which can then be used to verify the signature of tokens issued by the service. Typically, the service obtains the public key from a local keystore (JKS/PKCS12) by specifing the path of the keystore and the alias of the keystore entry. This case is not vulnerable. However it is also possible to obtain the keys from a JWK keystore file, by setting the configuration parameter `rs.security.keystore.type` to `jwk`. For this case all keys are returned in this file &quot;as is&quot;, including all private key and secret key credentials. This is an obvious security risk if the user has configured the signature keystore file with private or secret key credentials. From CXF 3.3.5 and 3.2.12, it is mandatory to specify an alias corresponding to the id of the key in the JWK file, and only this key is returned. In addition, any private key information is omitted by default. `oct` keys, which contain secret keys, are not returned at all.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cxf:apache-cxf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cxf:apache-cxf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "fixed" : "3.3.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cxf:cxf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.cxf:cxf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.3.0"
      }, {
        "fixed" : "3.3.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-12423"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r36e44ffc1a9b365327df62cdfaabe85b9a5637de102cea07d79b2dbf@%3Ccommits.cxf.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd49aabd984ed540c8ff7916d4d79405f3fa311d2fdbcf9ed307839a6@%3Ccommits.cxf.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd588ff96f18563aeb5f87ac8c6bce7aae86cb1a4d4be483f96e7208c@%3Cannounce.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rec7160382badd3ef4ad017a22f64a266c7188b9ba71394f0d321e2d4@%3Ccommits.cxf.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rfb87e0bf3995e7d560afeed750fac9329ff5f1ad49da365129b7f89e@%3Ccommits.cxf.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rff42cfa5e7d75b7c1af0e37589140a8f1999e578a75738740b244bd4@%3Ccommits.cxf.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  }, {
    "type" : "WEB",
    "url" : "http://cxf.apache.org/security-advisories.data/CVE-2019-12423.txt.asc?version=1&modificationDate=1579178393000&api=v2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-05-22T19:22:30Z",
    "nvd_published_at" : "2020-01-16T18:15:00Z"
  }
}