CVE-2021-28965
HIGH 7.5CVSS 3.1REXML round-trip instability
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.
- Published
- 21 Apr 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-115CWE-611
- Also known as
- BIT-ruby-2021-28965BIT-ruby-min-2021-28965GHSA-8cr8-4vfw-mr7h
- Sources
- NVDJSONOSV GHSA-8cr8-4vfw-mr7hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | ruby-lang | rexmlcpe:2.3:a:ruby-lang:rexml:*:*:*:*:*:ruby:*:* |
< 3.2.5 | 3.2.5 |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
< 2.6.7 | 2.6.7 |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 2.7.0, < 2.7.3 | 2.7.3 |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 3.0.0, < 3.0.1 | 3.0.1 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| OSV | RubyGems | rexml | < 3.2.5 | 3.2.5 |
References
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WTVFTLFVCSUE5CXHINJEUCKSHU4SWDMT/
- https://security.netapp.com/advisory/ntap-20210528-0003/ · Third Party Advisory, WEB
- https://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-vulnerability-in-rexml-cve-2021-28965/ · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-28965 · ADVISORY
- 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
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 21 Apr 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 30 Apr 2021)