Skip to content

GHSA-8cr8-4vfw-mr7h BIT-ruby-2021-28965 BIT-ruby-min-2021-28965 CVE-2021-28965

REXML round-trip instability

High RubyGems
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
5.06%
Chance of exploitation in the next 30 days. Higher than 92.32% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-115 Misinterpretation of Input
CWE-611 Improper Restriction of XML External Entity Reference
Fix
3.2.5
Upgrade rexml to this version or later

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.

Affected versions

RubyGems

PackageVulnerableFixed in
rexml
< 3.2.5
3.2.5

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

rexml RubyGems → 3.2.5

bundler
bundle update rexml # Gemfile: gem "rexml", ">= 3.2.5"

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Weakness

CWE-115: Misinterpretation of Input

The product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion.

CWE-611: Improper Restriction of XML External Entity Reference

The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.

How to prevent it
  • Implementation, System Configuration: Many XML parsers and validators can be configured to disable external entity expansion.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-c2f4-jgmc-q2r5
REXML has DoS condition when parsing malformed XML file
Medium Also affects rexml
GHSA-2rxp-v6pw-ch6m
REXML ReDoS vulnerability
High Also affects rexml
GHSA-vmwr-mc7x-5vc3
REXML denial of service vulnerability
Medium Also affects rexml
GHSA-5866-49gr-22v4
REXML DoS vulnerability
High Also affects rexml
GHSA-r55c-59qm-vjw6
REXML DoS vulnerability
High Also affects rexml
GHSA-4xqq-m2hx-25v8
REXML denial of service vulnerability
Medium Also affects rexml
GHSA-vg3r-rm7w-2xgh
REXML contains a denial of service vulnerability
Medium Also affects rexml
GHSA-8jr5-v98p-w75m
vLLM: image EXIF Rotation & PNG tRNS Transparency Not Normalized, Causing Mismatch Between Model Input and Expectations
Medium Same weakness, CWE-115
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor