CVE-2021-22097
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 · uneditedIn 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 confidenceIn 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.
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>= 2.2.0, <= 2.2.18>= 2.3.0, <= 2.3.10CVSS 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 checksWork through these to decide whether this CVE applies to you.
-
Identify installed Spring AMQP versionInspect 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.
-
Verify message listener or consumer codeSearch 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.
-
Check for Java serialized object content type handlingSearch 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.
-
Review message converter configurationExamine 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.
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 · scopedUpgrade 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.
Spring AMQP 2.2.19+ or 2.3.11+ (or latest 2.x stable release)
- 1. Identify all applications and services using Spring AMQP versions 2.2.0-2.2.18 or 2.3.0-2.3.10
- 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. Rebuild and redeploy all affected applications
- 4. Verify the upgrade does not break existing message handling functionality
- 5. Test that message consumption and production still work correctly after the upgrade
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing6.0 h
- Review / QA2.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2021-22097 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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