CVE-2018-16396: High severity ruby-lang Ruby vulnerability

Published Oct 25, 2018
·
Updated

An issue was discovered in Ruby before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.2, and 2.6.x before 2.6.0-preview3. It does not taint strings that result from unpacking tainted strings with some formats.

Other sources

Array#pack method converts the receiver’s contents into a string with specified format. If the receiver contains some tainted objects, the returned string also should be tainted. String#unpack method which converts the receiver into an array also should propagate its tainted flag to the objects contained in the returned array. But, with B, b, H and h directives, the tainted flags are not propagated. So, if a script processes unreliable inputs by Array#pack and/or String#unpack with these directives and checks the reliability with tainted flags, the check might be wrong.

External References:

https://www.ruby-lang.org/en/news/2018/10/17/not-propagated-taint-flag-in-some-formats-of-pack-cve-2018-16396/

Red Hat

Affected Software

18 affected components
debian/ruby2.1
debian/ruby2.5
ruby-lang Ruby>=2.3.0<=2.3.7
ruby-lang Ruby>=2.4.0<=2.4.4
ruby-lang Ruby>=2.5.0<=2.5.1
ruby-lang Ruby=2.6.0-preview1
ruby-lang Ruby=2.6.0-preview2
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=18.10
Debian Debian Linux=8.0
Debian Debian Linux=9.0
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=7.4
redhat Enterprise Linux=7.5
redhat Enterprise Linux=7.6

Event History

Oct 25, 2018
Data Sourced
via Red Hat·01:37 PM
DescriptionSeverityAffected Software
Nov 16, 2018
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description
Data Sourced
via NVD·06:29 PM
DescriptionSeverityAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·10:53 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·05:36 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is CVE-2018-16396?

CVE-2018-16396 is a vulnerability discovered in Ruby before version 2.6.0-preview3 that does not taint strings that result from unpacking tainted strings with some formats.

2

What is the severity of CVE-2018-16396?

The severity of CVE-2018-16396 is high, with a CVSS score of 8.1.

3

Which versions of Ruby are affected by CVE-2018-16396?

Versions before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.2, and 2.6.x before 2.6.0-preview3 are affected by CVE-2018-16396.

4

How do I fix CVE-2018-16396 on Ubuntu?

If you're on Ubuntu, upgrade to the corresponding fixed version for your release: 2.0.0.484-1ubuntu2.11 (Trusty), 2.3.1-2~16.04.11 (Xenial), 2.5.1-1ubuntu1.1 (Bionic), or 2.5.1-5ubuntu4.1 (Cosmic).

5

Where can I find more information about CVE-2018-16396?

You can find more information about CVE-2018-16396 at the following references: [Debian Security Tracker](https://lists.debian.org/debian-lts-announce/2018/10/msg00020.html), [HackerOne](https://hackerone.com/reports/385070), [Ruby-lang website](https://www.ruby-lang.org/en/news/2018/10/17/not-propagated-taint-flag-in-some-formats-of-pack-cve-2018-16396/).

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