Spring Advanced Message Queuing ProtocolFramework / library · VMware

CVE-2021-22097

MEDIUM · 6.5 CVSS v3.1 Published 2021-10-28
Fix available
A fix is available. Upgrade to after 2.3.10 or later.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
In Spring AMQP versions 2.2.0 - 2.2.18 and 2.3.0 - 2.3.10, the Spring AMQP Message object, in its toString() method, will deserialize a body for a message with content type application/x-java-serialized-object. It is possible to construct a malicious java.util.Dictionary object that can cause 100% CPU usage in the application if the toString() method is called.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

In Spring AMQP versions 2.2.0-2.2.18 and 2.3.0-2.3.10, the Message.toString() method deserializes the message body when the content type is application/x-java-serialized-object. A maliciously crafted java.util.Dictionary object serialized in the message body can trigger infinite recursion or similar behavior during deserialization in toString(), causing 100% CPU usage and denial of service.

MitigationUpgrade Spring AMQP to version 2.2.19 or 2.3.11 or later. Alternatively, avoid calling toString() on messages from untrusted sources or filter incoming messages with content type application/x-java-serialized-object at the listener level.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Spring Advanced Message Queuing ProtocolFramework / library
Affected:>= 2.2.0, <= 2.2.18>= 2.3.0, <= 2.3.10

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Spring AMQP version
    Inspect your project dependencies (pom.xml, build.gradle, package-lock.json) or the spring-amqp JAR file in your runtime lib directory for the org.springframework.amqp:spring-amqp artifact version.
    Affected if The version falls within 2.2.0-2.2.18 or 2.3.0-2.3.10.
  2. Verify message listener or consumer code
    Search your codebase for org.springframework.amqp.core.Message references, particularly any code that calls toString() on Message objects, or examine your message listener implementations that process incoming messages.
    Affected if Your code calls Message.toString() on messages received from external or untrusted sources.
  3. Check for Java serialized object content type handling
    Search your message listener or converter configuration for references to application/x-java-serialized-object, or examine whether your application accepts or processes messages with this content type.
    Affected if Your application deserializes or processes messages with content type application/x-java-serialized-object from potentially untrusted sources.
  4. Review message converter configuration
    Examine your Spring AMQP listener container factory and message converter bean definitions (such as SimpleMessageConverter or SerializerMessageConverter) in your application context or configuration class.
    Affected if A Java serialization-based converter is configured to handle incoming messages from external sources.

You are likely affected if your Spring AMQP version is between 2.2.0-2.2.18 or 2.3.0-2.3.10 AND your application calls toString() on messages received from untrusted sources that could have content type application/x-java-serialized-object.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 2.3.10
Interim mitigation

Upgrade Spring AMQP to version 2.2.19 or 2.3.11 or later. Alternatively, avoid calling toString() on messages from untrusted sources or filter incoming messages with content type application/x-java-serialized-object at the listener level.

Recommended fix Moderate confidence

Spring AMQP 2.2.19+ or 2.3.11+ (or latest 2.x stable release)

  1. 1. Identify all applications and services using Spring AMQP versions 2.2.0-2.2.18 or 2.3.0-2.3.10
  2. 2. Update the Spring AMQP dependency in your build configuration (Maven pom.xml or Gradle build.gradle) to version 2.2.19 or later for the 2.2.x line, or version 2.3.11 or later for the 2.3.x line
  3. 3. Rebuild and redeploy all affected applications
  4. 4. Verify the upgrade does not break existing message handling functionality
  5. 5. Test that message consumption and production still work correctly after the upgrade
Caveat Review Spring AMQP 2.2.19 and 2.3.11 release notes for any breaking changes; upgrade within same minor version recommended

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Spring Advanced Message Queuing Protocol Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA2.0 h
14.0 hours of engineering $2,380
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,808.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-22097 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-22097 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data