High

Private key leak in Apache CXF

  • Disclosed: 22.05.2020
  • Updated: 11.10.2026 11:21

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 "as is", 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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.apache.cxf:apache-cxf < 3.2.12, >= 3.3.0, < 3.3.5 3.2.12, 3.3.5
Java / Kotlin (Maven) org.apache.cxf:cxf < 3.2.12, >= 3.3.0, < 3.3.5 3.2.12, 3.3.5

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness (CWE)
CWE-522
Platform
Java / Kotlin (Maven)
Package
org.apache.cxf:apache-cxf, org.apache.cxf:cxf
Disclosed
22.05.2020
Updated
11.10.2026 11:21

Sources and licenses

OSV / GitHub Advisory Database - GHSA-42f2-f9vc-6365 - CC BY 4.0

Vulnerability history: org.apache.cxf:apache-cxf

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
7
First → latest
10.2018 01.2022
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 4
  • Medium 3

Disclosures per year

  1. 2018: 1
  2. 2019: 1
  3. 2020: 2
  4. 2021: 2
  5. 2022: 1
  6. 2023: 0
  7. 2024: 0
  8. 2025: 0
  9. 2026: 0
  1. High · 7.5 CVE-2021-30468 >= 3.4.0, < 3.4.4, < 3.3.11 3.4.4, 3.3.11
  2. High · 7.5 CVE-2021-22696 >= 3.4.0, < 3.4.3, < 3.3.10 3.4.3, 3.3.10
  3. Medium · 6.1 CVE-2020-13954 < 3.3.8, >= 3.4.0, < 3.4.1 3.3.8, 3.4.1
  4. Medium · 6.1 CVE-2019-17573 < 3.2.12, >= 3.3.0, < 3.3.5 3.2.12, 3.3.5
  5. Private key leak in Apache CXF this entry
    High · 7.5 CVE-2019-12423 < 3.2.12, >= 3.3.0, < 3.3.5 3.2.12, 3.3.5
  6. Medium · 6.5 CVE-2019-12406 < 3.2.11, >= 3.3.0, < 3.3.4 3.2.11, 3.3.4
  7. High · 8.1 CVE-2018-8039 >= 3.2.0, < 3.2.5, < 3.1.16 3.2.5, 3.1.16

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.