Skip to content
Heist/ feed
Back to feed
Medium

spring — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-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 String object from the message body, regardless of its size. This can cause an OOM Error with a large message

Products
spring
Affected versions
100.0+dfsg-2, 100.0+dfsg-2build1, 103.0+dfsg2-1, 103.0+dfsg2-1build1, 104.0+dfsg-2, 104.0+dfsg-3build2, 104.0+dfsg-4ubuntu1, 104.0+dfsg-4ubuntu2, 104.0+dfsg-4ubuntu5, 104.0+dfsg-4ubuntu6, 104.0+dfsg-4ubuntu7, 105.0.1+dfsg-2, 105.0.1+dfsg-3ubuntu1, 105.0.1+dfsg-3ubuntu2, 105.0.1+dfsg-4, 106.0+dfsg-2, 106.0+dfsg-3, 106.0+dfsg-3build2, 106.0+dfsg-3build3, 106.0+dfsg-4, 106.0+dfsg-5
Fixed versions
Not specified
CVEs
CVE-2021-22095
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 00:57 UTC · Revision 1

Source evidence

UBUNTU-CVE-2021-22095

core-osv · Original source

Published 30 Nov 2021, 19:15 UTC

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

osv:UBUNTU-CVE-2021-22095

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

spring

Fixed versions: Not specified

Complete source record
{
  "id": "b07407b0720981c8347eff4aa92be9dc4c0054c06ef6f7b8226d24184fcad4ba",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-22095",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2021-22095",
    "summary": "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",
    "evidence": "osv:UBUNTU-CVE-2021-22095",
    "products": [
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "100.0+dfsg-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "100.0+dfsg-2build1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "103.0+dfsg2-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "103.0+dfsg2-1build1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "104.0+dfsg-2",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "104.0+dfsg-3build2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "104.0+dfsg-4ubuntu1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "104.0+dfsg-4ubuntu2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "104.0+dfsg-4ubuntu5",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "104.0+dfsg-4ubuntu6",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "104.0+dfsg-4ubuntu7",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "105.0.1+dfsg-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "105.0.1+dfsg-3ubuntu1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "105.0.1+dfsg-3ubuntu2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "105.0.1+dfsg-4",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "106.0+dfsg-2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "106.0+dfsg-3",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "106.0+dfsg-3build2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "106.0+dfsg-3build3",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "106.0+dfsg-4",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "106.0+dfsg-4",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "106.0+dfsg-5",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spring",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "106.0+dfsg-4",
            "evidence": "/affected/7/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "UBUNTU-CVE-2021-22095",
      "aliases": [
        "UBUNTU-CVE-2021-22095"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "100.0+dfsg-2",
            "100.0+dfsg-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "100.0+dfsg-2build1"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "100.0+dfsg-2build1"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "100.0+dfsg-2build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "103.0+dfsg2-1",
            "103.0+dfsg2-1build1",
            "104.0+dfsg-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "104.0+dfsg-2"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "104.0+dfsg-2"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "104.0+dfsg-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "104.0+dfsg-3build2",
            "104.0+dfsg-4ubuntu1",
            "104.0+dfsg-4ubuntu2",
            "104.0+dfsg-4ubuntu5",
            "104.0+dfsg-4ubuntu6",
            "104.0+dfsg-4ubuntu7"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "104.0+dfsg-4ubuntu7"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "104.0+dfsg-4ubuntu7"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "104.0+dfsg-4ubuntu7"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "105.0.1+dfsg-2",
            "105.0.1+dfsg-3ubuntu1",
            "105.0.1+dfsg-3ubuntu2",
            "105.0.1+dfsg-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "105.0.1+dfsg-4"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "105.0.1+dfsg-4"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "105.0.1+dfsg-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "106.0+dfsg-2",
            "106.0+dfsg-3",
            "106.0+dfsg-3build2",
            "106.0+dfsg-3build3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "106.0+dfsg-3build3"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "106.0+dfsg-3build3"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "106.0+dfsg-3build3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "106.0+dfsg-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "106.0+dfsg-4"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "106.0+dfsg-4"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "106.0+dfsg-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "106.0+dfsg-4",
            "106.0+dfsg-5"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "106.0+dfsg-5"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "106.0+dfsg-5"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "106.0+dfsg-5"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spring",
            "purl": "pkg:deb/ubuntu/spring?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "106.0+dfsg-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-22095.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "spring",
                "binary_version": "106.0+dfsg-4"
              },
              {
                "binary_name": "spring-common",
                "binary_version": "106.0+dfsg-4"
              },
              {
                "binary_name": "spring-javaai",
                "binary_version": "106.0+dfsg-4"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:19.119101204Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-22095"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2021-22095",
        "https://tanzu.vmware.com/security/cve-2021-22097",
        "https://www.cve.org/CVERecord?id=CVE-2021-22095"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-22095",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 355236,
  "published_at": "2021-11-30T19:15:00+00:00"
}