Type Confusion Affecting rgb package, versions >=0.5.4 <0.8.20


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.45% (75th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-RGB-598763
  • published16 Aug 2020
  • disclosed14 Jun 2020
  • creditUnknown

Introduced: 14 Jun 2020

CVE-2020-25016  (opens in a new tab)
CWE-843  (opens in a new tab)

How to fix?

Upgrade rgb to version 0.8.20 or higher.

Overview

rgb is a RGB pixel struct.

Affected versions of this package are vulnerable to Type Confusion. It allows viewing and modifying data of any type T wrapped in RGB<T> as bytes, and do not correctly constrain RGB<T> and other wrapper structures to the types for which it is safe to do so. If T contains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory. If T contains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers.

CVSS Scores

version 3.1