Vulnerability · Published Feb 9, 2023 · Assigned by GitHub_M

CVE-2023-23626Denial of service when feeding malformed size arguments in go-bitfield

Medium 5.9

In plain English

A medium-severity security flaw in go-bitfield from ipfs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 60% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)0.9%top 39.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

go-bitfield is a simple bitfield package for the go language aiming to be more performant that the standard library. When feeding untrusted user input into the size parameter of `NewBitfield` and `FromBytes` functions, an attacker can trigger `panic`s. This happen when the `size` is a not a multiple of `8` or is negative. There were already a note in the `NewBitfield` documentation, however known users of this package are subject to this issue. Users are advised to upgrade. Users unable to upgrade should ensure that `size` is a multiple of 8 before calling `NewBitfield` or `FromBytes`.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/ipfs/go-bitfield1.1.0GHSA-2h6c-j3gf-xp9r
Gogithub.com/ipfs/go-bitfield1.1.0GO-2023-1558

Affected products (as reported)

VendorProductVersions
ipfs go-bitfield < 1.1.0

Weakness: CWE-754 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

References