Integer Overflow Affecting base64 package, versions < 0.5.2


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

EPSS
0.22% (60th 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-BASE64-72293
  • published4 Oct 2018
  • disclosed3 May 2017
  • creditAndrew Ayer

Introduced: 3 May 2017

CVE-2017-1000430  (opens in a new tab)
CWE-119  (opens in a new tab)

How to fix?

Upgrade base64 to version 0.5.2 or higher.

Overview

Affected versions of base64 are vulnerable to Integer Overflow when calculating the size of a buffer. If the input string was large, this would cause a buffer to be allocated that was too small. Since this function writes to the buffer using unsafe code, it would allow an attacker to write beyond the buffer, causing memory corruption and possibly the execution of arbitrary code.

CVSS Scores

version 3.1