Skip to content

Commit 2807804

Browse files
transoceanic2000reedloden
authored andcommitted
1 parent d924dba commit 2807804

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

rubies/ruby/CVE-2018-16396.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
engine: ruby
3+
cve: 2018-16396
4+
url: https://www.ruby-lang.org/en/news/2018/10/17/not-propagated-taint-flag-in-some-formats-of-pack-cve-2018-16396/
5+
title: Tainted flags not always propogated in Array#pack and String#unpack
6+
date: 2018-10-17
7+
description: |
8+
In `Array#pack` and `String#unpack` with some formats, the tainted flags of
9+
the original data are not propagated to the returned string/array.
10+
11+
`Array#pack` method converts the receiver’s contents into a string with
12+
specified format. If the receiver contains some tainted objects, the
13+
returned string also should be tainted. `String#unpack` method which
14+
converts the receiver into an array also should propagate its tainted flag
15+
to the objects contained in the returned array. But, with `B`, `b`, `H` and
16+
`h` directives, the tainted flags are not propagated. So, if a script
17+
processes unreliable inputs by `Array#pack` and/or `String#unpack` with these
18+
directives and checks the reliability with tainted flags, the check might be
19+
wrong.
20+
21+
All users running an affected release should upgrade immediately.
22+
patched_versions:
23+
- "~> 2.3.8"
24+
- "~> 2.4.5"
25+
- "~> 2.5.2"

0 commit comments

Comments
 (0)