Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-28965

The REXML gem before 3.2.5 in Ruby before 2.6.7, 2.7.x before 2.7.3, and 3.x before 3.0.1 does not properly address XML round-trip issues. An incorrect document can be produced after parsing and serializing.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-28965
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 06:11 UTC · Revision 1

Source evidence

CVE-2021-28965

core-osv · Original source

Published 21 Apr 2021, 07:15 UTC

The REXML gem before 3.2.5 in Ruby before 2.6.7, 2.7.x before 2.7.3, and 3.x before 3.0.1 does not properly address XML round-trip issues. An incorrect document can be produced after parsing and serializing.

osv:CVE-2021-28965
Complete source record
{
  "id": "db11fa661579711bb8f10c7c961c189d68312277bd9d4f19f646736d0dd2a5c5",
  "url": "https://osv.dev/vulnerability/CVE-2021-28965",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-28965",
    "summary": "The REXML gem before 3.2.5 in Ruby before 2.6.7, 2.7.x before 2.7.3, and 3.x before 3.0.1 does not properly address XML round-trip issues. An incorrect document can be produced after parsing and serializing.",
    "evidence": "osv:CVE-2021-28965",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-28965",
      "aliases": [
        "BIT-ruby-2021-28965",
        "BIT-ruby-min-2021-28965",
        "CVE-2021-28965",
        "GHSA-8cr8-4vfw-mr7h"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ruby/rexml",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "a622645e980ea5b91ad7b4d6fec32d113f15df88"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:rexml:*:*:*:*:*:ruby:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.2.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.1.9",
            "v3.2.4",
            "v3.2.3",
            "v3.2.2",
            "v3.2.1",
            "v3.2.0",
            "v3.1.8"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-28965.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/ruby/ruby",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "930143880a8b593e7444b94e2e0522b83a25c671"
                },
                {
                  "introduced": "647ee6f091eafcce70ffb75ddf7e121e192ab217"
                },
                {
                  "fixed": "6847ee089d7655b2a0eea4fee3133aeacd4cc7cc"
                },
                {
                  "introduced": "95aff214687a5e12c3eb57d056665741e734c188"
                },
                {
                  "fixed": "0fb782ee38ea37fd5fe8b1f775f8ad866a82a3f0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.6.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.7.0"
                      },
                      {
                        "fixed": "2.7.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "3.0.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3_0_0",
            "v2_7_2",
            "v2_7_1",
            "v2_7_0",
            "v1_0_r2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-28965.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:36.462263384Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WTVFTLFVCSUE5CXHINJEUCKSHU4SWDMT/",
        "https://security.netapp.com/advisory/ntap-20210528-0003/",
        "https://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-vulnerability-in-rexml-cve-2021-28965/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "34"
                  },
                  {
                    "last_affected": "34"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-28965",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 433978,
  "published_at": "2021-04-21T07:15:07.677+00:00"
}