Vulnerabilities in pkg:maven/com.sap.cloud.security/spring-security
PACKAGECVE-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.
pkg:maven/com.sap.cloud.security/spring-security
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
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).
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.
<dependency>
<groupId>com.sap.cloud.security</groupId>
<artifactId>java-security</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.sap.cloud.security</groupId>
<artifactId>java-security</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>com.sap.cloud.security</groupId>
<artifactId>spring-security</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.sap.cloud.security</groupId>
<artifactId>spring-security</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>com.sap.cloud.security.xsuaa</groupId>
<artifactId>spring-xsuaa</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.sap.cloud.security.xsuaa</groupId>
<artifactId>spring-xsuaa</artifactId>
<version>3.3.0</version>
</dependency>
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
CVE-2023-50422 Affected Java security Versions
6 component(s)| 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?
Which Java security versions are affected?
What version fixes CVE-2023-50422?
Is java-security affected?
Is spring-security affected?
What is the CVSS score of CVE-2023-50422?
What CWE is associated with CVE-2023-50422?
How can I check Maven dependencies for CVE-2023-50422?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}