CVE-2021-22051: Request injection in Spring Cloud Gateway

Summary

10/11/2021
Yes i
Moderate
6.5

CVE-2021-22051: Request injection in Spring Cloud Gateway. Affects org.springframework.cloud:spring-cloud-gateway across 2 version ranges.

>= 2.2.0, < 2.2.10.RELEASE0.5 >= 3.0.0, < 3.0.5

Fixed in 2.2.10.RELEASE0.5 or 3.0.5, depending on the release line you run. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Spring Cloud Gateway is a popular open-source project that provides a simple and effective way to route and filter HTTP requests coming into a Spring Boot application. It acts as an API gateway, allowing developers to control and manage the flow of requests between clients and downstream services. By leveraging Spring Cloud Gateway, developers can easily implement features like rate limiting, authentication, and request transformation. However, a vulnerability has been discovered in Spring Cloud Gateway that allows for request injection, potentially leading to unauthorized access or data leakage.

Vulnerability Detail

The vulnerability in Spring Cloud Gateway arises from a failure to properly validate and sanitize user input. Specifically crafted requests can be used to make additional requests on downstream services, bypassing any security measures put in place by the gateway. This can result in unauthorized access to sensitive data or the execution of unintended actions on the downstream services. The vulnerability has a CVSS score of 6.5, indicating a moderate severity level.

How To Fix

Latest published version: 5.1.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.2.0, < 2.2.10.RELEASE0.5 2.2.10.RELEASE0.5
  • >= 3.0.0, < 3.0.5 3.0.5

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 recommended to apply the necessary updates as soon as possible.

Conclusion

The vulnerability in Spring Cloud Gateway allows for request injection, potentially leading to unauthorized access or data leakage. It is crucial for users of affected versions to upgrade to the recommended versions to mitigate this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for org.springframework.cloud:spring-cloud-gateway →

Share this vulnerability

FAQ

Spring Cloud Gateway is an open-source project that provides a way to route and filter HTTP requests in a Spring Boot application. It acts as an API gateway, allowing developers to control and manage the flow of requests between clients and downstream services.

The vulnerability allows for request injection, which can lead to unauthorized access to sensitive data or the execution of unintended actions on downstream services.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

No, there are no known workarounds for this vulnerability. It is recommended to apply the necessary updates to fix the issue.

You can find more information about this vulnerability, including the technical details and affected versions, in the advisory provided by the GitHub Advisory Database. The link to the advisory is available in the vulnerability details.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework.cloud:spring-cloud-gateway.

How To Fix

Latest published version: 5.1.0-RC1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.2.0, < 2.2.10.RELEASE0.5 2.2.10.RELEASE0.5
  • >= 3.0.0, < 3.0.5 3.0.5

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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