CVE-2022-22963: Spring Cloud Function Code Injection in org.springframework.cloud:spring-cloud-function-context
Summary
CVE-2022-22963: Spring Cloud Function Code Injection with a specially crafted SpEL as a routing expression. Affects org.springframework.cloud:spring-cloud-function-context across 2 version ranges.
< 3.1.7
>= 3.2.0, < 3.2.3
Fixed in 3.1.7 or 3.2.3, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
org.springframework.cloud:spring-cloud-function-context is a Maven package that provides functionality for Spring Cloud Function. It allows users to define and execute lightweight, single-purpose functions in a serverless environment. This package is widely used in Java applications that leverage Spring Cloud Function for their serverless architecture. However, versions 3.1.6, 3.2.2, and older unsupported versions of this package are vulnerable to a code injection vulnerability when using routing functionality.
Vulnerability Detail
The vulnerability arises from the ability for a user to provide a specially crafted SpEL (Spring Expression Language) as a routing-expression. This can lead to remote code execution and unauthorized access to local resources. An attacker can exploit this vulnerability by manipulating the routing-expression to execute arbitrary code on the server hosting the application. This can result in a complete compromise of the application and potentially the underlying system. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 3.1.73.1.7 -
>= 3.2.0, < 3.2.33.2.3
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the recommended fix by upgrading to a non-vulnerable version of org.springframework.cloud:spring-cloud-function-context.
Conclusion
In conclusion, org.springframework.cloud:spring-cloud-function-context versions 3.1.6, 3.2.2, and older unsupported versions are vulnerable to a critical code injection vulnerability. It is crucial to upgrade to the fixed versions (3.1.7 or 3.2.3) and review routing-expressions for any potential malicious code. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for org.springframework.cloud:spring-cloud-function-context →
FAQ
org.springframework.cloud:spring-cloud-function-context is a Maven package that provides functionality for Spring Cloud Function. It allows users to define and execute lightweight, single-purpose functions in a serverless environment.
The vulnerability occurs when using routing functionality in Spring Cloud Function. A specially crafted SpEL as a routing-expression can lead to code injection and remote code execution.
This vulnerability can result in remote code execution and unauthorized access to local resources. An attacker can fully compromise the application and potentially the underlying system.
The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.
To fix this vulnerability, you need to upgrade org.springframework.cloud:spring-cloud-function-context to a non-vulnerable version (3.1.7 or 3.2.3). Additionally, review and validate any routing-expressions used in your application to ensure they do not contain malicious code.
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework.cloud:spring-cloud-function-context.