WaratekVRT Sign in

CVE-2021-22095

Severity6.5 Medium CVSS 3.1 2 scores
Fixed in2.2.20, 2.3.11
WeaknessDeserialization of untrusted data (CWE-502)
Published30 Nov 2021
Updated17 Jun 2026

Description

In Spring AMQP versions 2.2.0 - 2.2.19 and 2.3.0 - 2.3.11, the Spring AMQP Message object, in its toString() method, will create a new String object from the message body, regardless of its size. This can cause an OOM Error with a large message

Exploitation status

No public exploit

No exploit has been reported in the sources we check. Published 4 years ago.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC none indexed
  • EPSS 1.1% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR deserialization DoS security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-502: Deserialization of Untrusted Data. Impact is availability-only (no confidentiality or integrity loss), so this is the DoS variant of the class, not RCE — the ARMR DoS rule applies rather than the RCE rule pair.

How to mitigate CVE-2021-22095

Upgrade the affected software to a release that fixes it: 2.2.20 or 2.3.11. Until you can, Waratek RASP blocks exploitation with its deserialization rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

CVSS

6.5 MEDIUM v3.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 6.5 MEDIUM CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H NVD Primary published
CVSS 2.0 4.0 none AV:N/AC:L/Au:S/C:N/I:N/A:P NVD Primary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.springframework.amqp:spring-amqp 2.2.0 2.2.20 unbounded
org.springframework.amqp:spring-amqp 2.3.0 2.3.11 unbounded

Products and versions

2 products, 4 version entries
SourceVendorProductSchemeAffected versions
osv org.springframework.amqp spring-amqp generic ≥ 2.2.0 and < 2.2.20 · ≥ 2.3.0 and < 2.3.11
nvd vmware spring advanced message queuing protocol generic ≥ 2.2.0 and < 2.2.19 · ≥ 2.3.0 and < 2.3.11

References

URLTags
https://github.com/spring-projects/spring-amqp/commit/bde294d62a8b7f3f1d5a9f50f862c6f0782efb9d WEB
https://tanzu.vmware.com/security/cve-2021-22097 WEB

Timeline

Published2021-11-30By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.