CVE-2021-45029: Code Injection in Apache ShenYu

Summary

28/01/2022
Yes i
Critical
9.8

CVE-2021-45029: Code injection in ShenYu. Affects org.apache.shenyu:shenyu-common versions >= 2.4.0, < 2.4.2. Fixed in 2.4.2. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Apache ShenYu is an open-source project that provides a lightweight, high-performance, and scalable API gateway. It is designed to handle large amounts of traffic and provide various features such as load balancing, rate limiting, and authentication. The vulnerable package in focus is 'org.apache.shenyu:shenyu-common', which is a common module used by ShenYu. This package is written in Java and is responsible for providing common functionalities and utilities to other components of ShenYu.

Vulnerability Detail

The vulnerability identified as CVE-2021-45029 is a code injection vulnerability that affects Apache ShenYu versions 2.4.0 and 2.4.1. It specifically involves Groovy Code Injection and SpEL (Spring Expression Language) Injection, which can lead to remote code execution. An attacker can exploit this vulnerability by injecting malicious code into the affected application, potentially gaining unauthorized access, executing arbitrary commands, or causing other malicious activities. This vulnerability is considered critical with a CVSS score of 9.8.

How To Fix

Minimum fixed version

2.4.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can implement input validation and sanitization techniques to mitigate the risk of code injection. This involves validating and filtering user input to ensure it adheres to expected formats and does not contain any malicious code. It is recommended to use secure coding practices and frameworks that provide built-in protection against code injection vulnerabilities.

Conclusion

In conclusion, the code injection vulnerability in Apache ShenYu (CVE-2021-45029) poses a significant risk to applications utilizing the 'org.apache.shenyu:shenyu-common' package. It is crucial to promptly update to the latest version of the package and implement secure coding practices to mitigate the risk of code injection attacks. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.shenyu:shenyu-common →

Share this vulnerability

FAQ

Apache ShenYu is an open-source API gateway that provides various features such as load balancing, rate limiting, and authentication. It is designed to handle high traffic loads and improve the performance of microservices architectures.

This vulnerability allows an attacker to inject malicious code into the affected application, potentially leading to remote code execution. This can result in unauthorized access, data breaches, and other malicious activities.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the pom.xml file of your project.

Yes, a fix is available for this vulnerability. It is recommended to upgrade the 'org.apache.shenyu:shenyu-common' package to version 2.4.2 or later to mitigate the risk of code injection.

If you suspect that your application is affected by this vulnerability, it is recommended to upgrade the 'org.apache.shenyu:shenyu-common' package to the latest version as soon as possible. Additionally, review your application's code for any potential code injection vulnerabilities and implement input validation and sanitization techniques.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.shenyu:shenyu-common.

How To Fix

Minimum fixed version

2.4.2

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback