CVE-2021-28965: XEE
A flaw was found in the way the Ruby REXML library parsed XML documents. Parsing a specially crafted XML document using REXML and writing parsed data back to a new XML document results in creating a document with a different structure. This issue could affect the integrity of processed data in applications using REXML that parse XML documents, write data back to XML, and re-parse them again.
Other sources
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.
When parsing and serializing a crafted XML document, REXML gem (including the one bundled with Ruby) can create a wrong XML document whose structure is different from the original one. The impact of this issue highly depends on context, but it may lead to a vulnerability in some programs that are using REXML.
Reference: https://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-vulnerability-in-rexml-cve-2021-28965/
— Red Hat
Affected Software
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-28965?
CVE-2021-28965 is a vulnerability that affects the REXML gem in Ruby before versions 2.6.7, 2.7.x before 2.7.3, and 3.x before 3.0.1. It allows an attacker to modify the structure of an XML document, potentially compromising the integrity of processed data.
How does CVE-2021-28965 affect applications?
CVE-2021-28965 can affect applications that use the REXML library in Ruby. When parsing a specially crafted XML document and writing the parsed data back to a new XML document, the resulting document may have a different structure, compromising the integrity of the processed data.
What is the severity of CVE-2021-28965?
CVE-2021-28965 has a severity of 'high' with a CVSS score of 7.0.
How can CVE-2021-28965 be fixed?
To fix CVE-2021-28965, update Ruby to version 2.5.9, 2.6.7, 2.7.3, or 3.0.1, and update the rubygem-rexml package to version 3.2.5.
Where can I find more information about CVE-2021-28965?
You can find more information about CVE-2021-28965 at the following references: [CVE-2021-28965](https://www.cve.org/CVERecord?id=CVE-2021-28965), [NVD](https://nvd.nist.gov/vuln/detail/CVE-2021-28965), [Red Hat Bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=1947526), [Red Hat Security Advisory](https://access.redhat.com/errata/RHSA-2021:2584).