Improper Input Validation Affecting github.com/ipfs/go-bitfield package, versions <1.1.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.92% (62nd 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-GOLANG-GITHUBCOMIPFSGOBITFIELD-3318111
  • published10 Feb 2023
  • disclosed10 Feb 2023
  • creditJorropo

Introduced: 10 Feb 2023

CVE-2023-23626  (opens in a new tab)
CWE-754  (opens in a new tab)

How to fix?

Upgrade github.com/ipfs/go-bitfield to version 1.1.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Input Validation such that when feeding untrusted user input into the size parameter of NewBitfield and FromBytes functions, an attacker can trigger panics. This happens when the size is a not a multiple of 8 or is negative.

Note: Users unable to upgrade should ensure that size is a multiple of 8 before calling NewBitfield or FromBytes.

CVSS Base Scores

version 3.1