Vulnerabilities in pkg:maven/com.sap.cloud.security/spring-security

PACKAGE
Advisory Identifier: GHSA-59c9-pxq8-9c73
Advisory Summary

CVE-2023-50422 is a CRITICAL (CVSS 9.1) improper jwt signature validation vulnerability (CWE-269: Improper Privilege Management) affecting Java security libraries in the Maven ecosystem. The issue involves improper jwt signature validation in sap security services library. Remediation is available by upgrading affected packages to version 2.17.0, 3.3.0.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.sap.cloud.security/spring-security

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.sap.cloud.security/spring-security. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-59c9-pxq8-9c73 CVE-2023-50422 CRITICAL Improper JWT Signature Validation in SAP Security Services Library
GHSA-gcgw-q47m-prvj - CRITICAL Duplicate Advisory: Improper JWT Signature Validation in SAP Security Services Library

CVE-2023-50422 at a Glance

CVE Identifier CVE-2023-50422
GHSA Identifier GHSA-59c9-pxq8-9c73
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-269: Improper Privilege Management
Affected Product Java security
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.1

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:H/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 High (I:H)
Availability None (A:N)

How to Fix CVE-2023-50422

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

com.sap.cloud.security:java-security fixed: 2.17.0
<dependency>
    <groupId>com.sap.cloud.security</groupId>
    <artifactId>java-security</artifactId>
    <version>2.17.0</version>
</dependency>
com.sap.cloud.security:java-security fixed: 3.3.0
<dependency>
    <groupId>com.sap.cloud.security</groupId>
    <artifactId>java-security</artifactId>
    <version>3.3.0</version>
</dependency>
com.sap.cloud.security:spring-security fixed: 2.17.0
<dependency>
    <groupId>com.sap.cloud.security</groupId>
    <artifactId>spring-security</artifactId>
    <version>2.17.0</version>
</dependency>
com.sap.cloud.security:spring-security fixed: 3.3.0
<dependency>
    <groupId>com.sap.cloud.security</groupId>
    <artifactId>spring-security</artifactId>
    <version>3.3.0</version>
</dependency>
com.sap.cloud.security.xsuaa:spring-xsuaa fixed: 2.17.0
<dependency>
    <groupId>com.sap.cloud.security.xsuaa</groupId>
    <artifactId>spring-xsuaa</artifactId>
    <version>2.17.0</version>
</dependency>
com.sap.cloud.security.xsuaa:spring-xsuaa fixed: 3.3.0
<dependency>
    <groupId>com.sap.cloud.security.xsuaa</groupId>
    <artifactId>spring-xsuaa</artifactId>
    <version>3.3.0</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=com.sap.cloud.security

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.sap.cloud.security

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

Note: The mvn dependency:tree -Dincludes=com.sap.cloud.security 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Java security, 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

### Impact SAP BTP Security Services Integration Library ([Java] cloud-security-services-integration-library) allows under certain conditions an escalation of privileges. On successful exploitation, an unauthenticated attacker can obtain arbitrary permissions within the application. ### Patches Upgrade to patched version >= 2.17.0 or >= 3.3.0 We always recommend to upgrade to the latest released version. ### Workarounds No workarounds ### References https://www.cve.org/CVERecord?id=CVE-2023-50422

CVE-2023-50422 Affected Java security Versions

6 component(s)
Fixed Versions:
2.17.03.3.0
Product / Package Ecosystem Affected Versions Fixed Version
com.sap.cloud.security:java-security
Maven
< 2.17.0
2.17.0
com.sap.cloud.security:java-security
Maven
≥ 3.0.0
< 3.3.0
3.3.0
com.sap.cloud.security:spring-security
Maven
< 2.17.0
2.17.0
com.sap.cloud.security:spring-security
Maven
≥ 3.0.0
< 3.3.0
3.3.0
com.sap.cloud.security.xsuaa:spring-xsuaa
Maven
< 2.17.0
2.17.0
com.sap.cloud.security.xsuaa:spring-xsuaa
Maven
≥ 3.0.0
< 3.3.0
3.3.0

References

Frequently Asked Questions

What is CVE-2023-50422?
CVE-2023-50422 is a security vulnerability in Java security involving Improper JWT Signature Validation in SAP Security Services Library under CWE-269: Improper Privilege Management.
Which Java security versions are affected?
Affected versions include releases prior to 2.17.0, 3.3.0 across affected packages: com.sap.cloud.security:java-security, com.sap.cloud.security:spring-security, com.sap.cloud.security.xsuaa:spring-xsuaa.
What version fixes CVE-2023-50422?
Upgrading to 2.17.0, 3.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is java-security affected?
Yes, com.sap.cloud.security:java-security is affected in releases prior to 2.17.0, 3.3.0. Upgrade your dependency to 2.17.0, 3.3.0 or later.
Is spring-security affected?
Yes, com.sap.cloud.security:spring-security is affected in releases prior to 2.17.0, 3.3.0. Upgrade your dependency to 2.17.0, 3.3.0 or later.
What is the CVSS score of CVE-2023-50422?
CVE-2023-50422 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-50422?
CVE-2023-50422 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Maven dependencies for CVE-2023-50422?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.sap.cloud.security'. 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-59c9-pxq8-9c73",
  "modified" : "2024-09-30T19:44:16Z",
  "published" : "2023-12-13T13:33:57Z",
  "aliases" : [ "CVE-2023-50422" ],
  "summary" : "Improper JWT Signature Validation in SAP Security Services Library ",
  "details" : "### Impact\nSAP BTP Security Services Integration Library ([Java] cloud-security-services-integration-library) allows under certain conditions an escalation of privileges. On successful exploitation, an unauthenticated attacker can obtain arbitrary permissions within the application.\n\n### Patches\nUpgrade to patched version >= 2.17.0 or >= 3.3.0 \nWe always recommend to upgrade to the latest released version.\n\n### Workarounds\nNo workarounds\n\n### References\nhttps://www.cve.org/CVERecord?id=CVE-2023-50422\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.sap.cloud.security:java-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.17.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.sap.cloud.security:java-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.sap.cloud.security:spring-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.17.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.sap.cloud.security:spring-security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.sap.cloud.security.xsuaa:spring-xsuaa"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.17.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.sap.cloud.security.xsuaa:spring-xsuaa"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SAP/cloud-security-services-integration-library/security/advisories/GHSA-59c9-pxq8-9c73"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50422"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAP/cloud-security-services-integration-library/commit/4b3e42ab23df6418243b29908b1a2582818d9360"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAP/cloud-security-services-integration-library/commit/7ce9601979c30ae269a1cbaf7cf33486d10736f1"
  }, {
    "type" : "WEB",
    "url" : "https://blogs.sap.com/2023/12/12/unveiling-critical-security-updates-sap-btp-security-note-3411067"
  }, {
    "type" : "WEB",
    "url" : "https://en.wikipedia.org/wiki/JSON_Web_Token"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SAP/cloud-security-services-integration-library"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3411067"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3413475"
  }, {
    "type" : "WEB",
    "url" : "https://mvnrepository.com/artifact/com.sap.cloud.security.xsuaa/spring-xsuaa"
  }, {
    "type" : "WEB",
    "url" : "https://mvnrepository.com/artifact/com.sap.cloud.security/java-security"
  }, {
    "type" : "WEB",
    "url" : "https://mvnrepository.com/artifact/com.sap.cloud.security/spring-security"
  }, {
    "type" : "WEB",
    "url" : "https://www.sap.com/documents/2022/02/fa865ea4-167e-0010-bca6-c68f7e60039b.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-13T13:33:57Z",
    "nvd_published_at" : null
  }
}