===========================================================================
ZMCIRT Vulnerability Bulletin
ZMC-2021.08.04.0943
Microsoft Edge: Multiple vulnerabilities
8th April 2021
===========================================================================
ZMCIRT Security Bulletin Summary
---------------------------------
Product: Ruby
Publisher: Ruby
Operating System: UNIX variants (UNIX, Linux, OSX)
Windows
Impact/Access: Create Arbitrary Files -- Remote/Unauthenticated
Reduced Security -- Remote with User Interaction
Resolution: Patch/Upgrade
CVE Names: CVE-2021-28966 CVE-2021-28965
Original Bulletin:
https://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-vulnerability-in-rexml-cve-2021-28965/
https://www.ruby-lang.org/en/news/2021/04/05/tempfile-path-traversal-on-windows-cve-2021-28966/
Comment: This bulletin contains two (2) Ruby security advisories.
- --------------------------BEGIN INCLUDED TEXT--------------------
CVE-2021-28965: XML round-trip vulnerability in REXML
There is an XML round-trip vulnerability in REXML gem bundled with Ruby. This
vulnerability has been assigned the CVE identifier CVE-2021-28965 . We strongly
recommend upgrading the REXML gem.
Details
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.
Please update REXML gem to version 3.2.5 or later.
If you are using Ruby 2.6 or later:
o Please use Ruby 2.6.7, 2.7.3, or 3.0.1.
o Alternatively, you can use gem update rexml to update it. If you are using
bundler, please add gem "rexml", ">= 3.2.5" to your Gemfile .
If you are using Ruby 2.5.8 or prior:
o Please use Ruby 2.5.9.
o You cannot use gem update rexml for Ruby 2.5.8 or prior.
o Note that Ruby 2.5 series is now EOL, so please consider upgrading Ruby to
2.6.7 or later as soon as possible.
Affected versions
o Ruby 2.5.8 or prior (You can NOT use gem upgrade rexml for this version.)
o Ruby 2.6.7 or prior
o Ruby 2.7.2 or prior
o Ruby 3.0.1 or prior
o REXML gem 3.2.4 or prior
- --------------------------------------------------------------------------------
CVE-2021-28966: Path traversal in Tempfile on Windows
There is an unintentional directory creation vulnerability in tmpdir library
bundled with Ruby on Windows. And there is also an unintentional file creation
vulnerability in tempfile library bundled with Ruby on Windows, because it uses
tmpdir internally. This vulnerability has been assigned the CVE identifier
CVE-2021-28966 .
Details
Dir.mktmpdir method introduced by tmpdir library accepts the prefix and the
suffix of the directory which is created as the first parameter. The prefix can
contain relative directory specifiers "..\\" , so this method can be used to
target any directory. So, if a script accepts an external input as the prefix,
and the targeted directory has inappropriate permissions or the ruby process
has inappropriate privileges, the attacker can create a directory or a file at
any directory.
This is the same issue as CVE-2018-6914 , but the previous fix was incomplete
on Windows.
All users running an affected release should upgrade immediately.
Affected versions
o Ruby 2.7.2 or prior
o Ruby 3.0.0
ZMCIRT has made every effort to ensure that the information contained
in this document is accurate. However, the decision to use the information
described is the responsibility of each user or organisation. The decision to
follow or act on information or advice contained in this security bulletin is
the responsibility of each user or organisation, and should be considered in
accordance with your organisation's site policies and procedures. ZMCERT
takes no responsibility for consequences which may arise from following or
acting on information or advice contained in this security bulletin.
===========================================================================
Internet Email: incidents@cirt.zm
Telephone: 7070
ZMCIRT personnel answer during Zambian business hours
which are 8am to 5pm.
On call after hours for member emergencies only.
===========================================================================
Copyright @2023 ZAMBIA CIRT