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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/ipfs/go-bitfield | 1.1.0 | GHSA-2h6c-j3gf-xp9r |
| Go | github.com/ipfs/go-bitfield | 1.1.0 | GO-2023-1558 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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