CVE-2023-28857: Cas server support x509 core Apereo CAS Vulnerable To Credential Vulnerability

MODERATE
Advisory Identifier: GHSA-p78h-m8pv-g9gm
CVSS 4.0
CWE-522 CWE-200
Published
Advisory Summary

CVE-2023-28857 is a MODERATE (CVSS 4.0) apereo cas vulnerable to credential vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Cas server support x509 core libraries in the Maven ecosystem. The issue involves apereo cas vulnerable to credential leaks for ldap authentication. Remediation is available by upgrading affected packages to version 6.6.6.

CVE-2023-28857 at a Glance

CVE Identifier CVE-2023-28857
GHSA Identifier GHSA-p78h-m8pv-g9gm
Severity MODERATE
CVSS v3.1 Base Score 4.0
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Cas server support x509 core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.0

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:C/C:L/I:N/A:N).

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

How to Fix CVE-2023-28857

To remediate this vulnerability, upgrade all affected Cas server support x509 core 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.apereo.cas:cas-server-support-x509-core fixed: 6.6.6
<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-x509-core</artifactId>
    <version>6.6.6</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.apereo.cas

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apereo.cas

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

Note: The mvn dependency:tree -Dincludes=org.apereo.cas 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 Cas server support x509 core, 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

Apereo CAS is an open source multilingual single sign-on solution for the web. Apereo CAS can be configured to use authentication based on client X509 certificates. These certificates can be provided via TLS handshake or a special HTTP header, such as “ssl_client_cert”. When checking the validity of the provided client certificate, X509CredentialsAuthenticationHandler performs check that this certificate is not revoked. To do so, it fetches URLs provided in the “CRL Distribution Points” extension of the certificate, which are taken from the certificate itself and therefore can be controlled by a malicious user. If the CAS server is configured to use an LDAP server for x509 authentication with a password, for example by setting a “cas.authn.x509.ldap.ldap-url” and “cas.authn.x509.ldap.bind-credential” properties, X509CredentialsAuthenticationHandler fetches revocation URLs from the certificate, which can be LDAP urls. When making requests to this LDAP urls, Apereo CAS uses the same password as for initially configured LDAP server, which can lead to a password leak. An unauthenticated user can leak the password used to LDAP connection configured on server. This issue has been addressed in version 6.6.6. Users are advised to upgrade. There are no known workarounds for this vulnerability.

CVE-2023-28857 Affected Cas server support x509 core Versions

1 component(s)
Fixed Versions:
6.6.6
Product / Package Ecosystem Affected Versions Fixed Version
org.apereo.cas:cas-server-support-x509-core
Maven
≥ 6.5.0
< 6.6.6
6.6.6

References

Frequently Asked Questions

What is CVE-2023-28857?
CVE-2023-28857 is a security vulnerability in Cas server support x509 core involving Apereo CAS vulnerable to credential leaks for LDAP authentication under CWE-522: Insufficiently Protected Credentials.
Which Cas server support x509 core versions are affected?
Affected versions include releases prior to 6.6.6 across affected packages: org.apereo.cas:cas-server-support-x509-core.
What version fixes CVE-2023-28857?
Upgrading to 6.6.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cas-server-support-x509-core affected?
Yes, org.apereo.cas:cas-server-support-x509-core is affected in releases prior to 6.6.6. Upgrade your dependency to 6.6.6 or later.
What is the CVSS score of CVE-2023-28857?
CVE-2023-28857 has a CVSS v3.1 base score of 4.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2023-28857?
CVE-2023-28857 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-2023-28857?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apereo.cas'. 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-p78h-m8pv-g9gm",
  "modified" : "2024-08-05T21:18:59Z",
  "published" : "2024-08-05T21:18:59Z",
  "aliases" : [ "CVE-2023-28857" ],
  "summary" : "Apereo CAS vulnerable to credential leaks for LDAP authentication",
  "details" : "Apereo CAS is an open source multilingual single sign-on solution for the web. Apereo CAS can be configured to use authentication based on client X509 certificates. These certificates can be provided via TLS handshake or a special HTTP header, such as “ssl_client_cert”. When checking the validity of the provided client certificate, X509CredentialsAuthenticationHandler performs check that this certificate is not revoked. To do so, it fetches URLs provided in the “CRL Distribution Points” extension of the certificate, which are taken from the certificate itself and therefore can be controlled by a malicious user. If the CAS server is configured to use an LDAP server for x509 authentication with a password, for example by setting a “cas.authn.x509.ldap.ldap-url” and “cas.authn.x509.ldap.bind-credential” properties, X509CredentialsAuthenticationHandler fetches revocation URLs from the certificate, which can be LDAP urls. When making requests to this LDAP urls, Apereo CAS uses the same password as for initially configured LDAP server, which can lead to a password leak. An unauthenticated user can leak the password used to LDAP connection configured on server. This issue has been addressed in version 6.6.6. Users are advised to upgrade. There are no known workarounds for this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apereo.cas:cas-server-support-x509-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.5.0"
      }, {
        "fixed" : "6.6.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28857"
  }, {
    "type" : "WEB",
    "url" : "https://apereo.github.io/2023/02/20/x509-vuln"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apereo/cas"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apereo/cas/releases/tag/v6.6.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graciantrivino/cas/blob/b90003f43a8ac0382d5416ceb01074feb936bf24/cas-server-support-x509/src/main/java/org/jasig/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandler.java#L231"
  }, {
    "type" : "WEB",
    "url" : "https://securitylab.github.com/advisories"
  }, {
    "type" : "ADVISORY",
    "url" : "https://securitylab.github.com/advisories/GHSL-2023-009_Apereo_CAS"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-522" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-05T21:18:59Z",
    "nvd_published_at" : "2023-06-27T18:15:13Z"
  }
}