CVE-2021-28965: XEE

Published Apr 5, 2021
·
Updated

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

13 affected componentsFixes available
redhat/rh-ruby25-ruby<0:2.5.9-9.el7
0:2.5.9-9.el7
redhat/rh-ruby27-ruby<0:2.7.3-129.el7
0:2.7.3-129.el7
redhat/rh-ruby26-ruby<0:2.6.7-119.el7
0:2.6.7-119.el7
redhat/ruby<2.5.9
2.5.9
redhat/ruby<2.6.7
2.6.7
redhat/ruby<2.7.3
2.7.3
redhat/ruby<3.0.1
3.0.1
redhat/rubygem-rexml<3.2.5
3.2.5
ruby-lang Rexml Ruby<3.2.5
ruby-lang Ruby<2.6.7
ruby-lang Ruby>=2.7.0<2.7.3
ruby-lang Ruby>=3.0.0<3.0.1
Fedoraproject Fedora=34

Event History

Apr 5, 2021
CVE Published
12:00 AM
Apr 8, 2021
Data Sourced
via Red Hat·04:46 PM
DescriptionSeverityAffected Software
Apr 21, 2021
CVE Published
via MITRE·06:55 AM
Data Sourced
via MITRE·06:55 AM
Description

Frequently Asked Questions

1

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.

2

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.

3

What is the severity of CVE-2021-28965?

CVE-2021-28965 has a severity of 'high' with a CVSS score of 7.0.

4

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.

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).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203