# CVE-2021-28965: REXML round-trip instability

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.45%, higher than 91% of CVEs (2026-12-01)
- Published: 2021-04-21T06:55:24.000Z
- Modified: 2026-09-08T08:48:19.309Z
- Also known as: GHSA-8cr8-4vfw-mr7h, BIT-RUBY-2021-28965, BIT-RUBY-MIN-2021-28965
- Weaknesses: CWE-115, CWE-611
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- rexml (RubyGems): before 3.2.5
- ruby-lang rexml: before 3.2.5
- ruby-lang ruby: before 2.6.7; from 2.7.0 before 2.7.3; from 3.0.0 before 3.0.1
- fedoraproject fedora: 34
- ruby (Bitnami): before 2.6.7; from 2.7.0 before 2.7.3; from 3.0.0 before 3.0.1
- ruby-min (Bitnami): before 2.6.7; from 2.7.0 before 2.7.3; from 3.0.0 before 3.0.1

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-vulnerability-in-rexml-cve-2021-28965/> (advisory, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WTVFTLFVCSUE5CXHINJEUCKSHU4SWDMT/> (vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210528-0003/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-28965> (advisory, web)
- <https://github.com/ruby/rexml/commit/2fe62e29094d95921d7e19abbd2e26b23d78dc5b> (web)
- <https://github.com/ruby/rexml/commit/3c137eb119550874b2b3e27d12b733ca67033377> (web)
- <https://github.com/ruby/rexml/commit/6a250d2cd1194c2be72becbdd9c3e770aa16e752> (web)
- <https://github.com/ruby/rexml/commit/9b311e59ae05749e082eb6bbefa1cb620d1a786e> (web)
- <https://github.com/ruby/rexml/commit/a659c63e37414506dfb0d4655e031bb7a2e73fc8> (web)
- <https://github.com/ruby/rexml/commit/f7bab8937513b1403cea5aff874cbf32fd5e8551> (web)
- <https://github.com/ruby/rexml/commit/f9d88e4948b4a43294c25dc0edb16815bd9d8618> (web)
- <https://hackerone.com/reports/1104077> (web)
- <https://github.com/ruby/rexml> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rexml/CVE-2021-28965.yml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WTVFTLFVCSUE5CXHINJEUCKSHU4SWDMT> (web)
- <https://rubygems.org/gems/rexml> (web)
- <https://security.netapp.com/advisory/ntap-20210528-0003> (web)
- <https://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-vulnerability-in-rexml-cve-2021-28965> (web)

## Sources

- CVE List: [CVE-2021-28965](https://www.cve.org/CVERecord?id=CVE-2021-28965), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-8cr8-4vfw-mr7h](https://github.com/advisories/GHSA-8cr8-4vfw-mr7h), CC-BY-4.0, modified 2025-01-27
- NVD: [CVE-2021-28965](https://nvd.nist.gov/vuln/detail/CVE-2021-28965), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-RUBY-2021-28965](https://osv.dev/vulnerability/BIT-RUBY-2021-28965), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-RUBY-MIN-2021-28965](https://osv.dev/vulnerability/BIT-RUBY-MIN-2021-28965), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-28965 · Whole record: https://cve.day/CVE-2021-28965.json · Rebuilt by cve.day 2026-11-25T22:58:00.873Z
