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

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.92%, higher than 61% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-02-09T20:54:07.075Z
- Modified: 2026-09-10T03:49:51.750Z
- Also known as: GHSA-2h6c-j3gf-xp9r, GO-2023-1558
- Weaknesses: CWE-754, CWE-1284
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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`.

(As written by CVE List.)

## Affected

- ipfs go-bitfield: < 1.1.0
- github.com/ipfs/go-bitfield (Go): before 1.1.0
- protocol go-bitfield: before 1.1.0

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r> (exploit, advisory, patch, vendor-advisory, web)
- <https://github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-23626> (advisory)
- <https://github.com/ipfs/go-bitfield> (package)
- <https://pkg.go.dev/vuln/GO-2023-1558> (web)

## Sources

- CVE List: [CVE-2023-23626](https://www.cve.org/CVERecord?id=CVE-2023-23626), CVE Terms of Use, modified 2025-03-10
- GitHub Advisory Database: [GHSA-2h6c-j3gf-xp9r](https://github.com/advisories/GHSA-2h6c-j3gf-xp9r), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2023-1558](https://pkg.go.dev/vuln/GO-2023-1558), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2023-23626](https://nvd.nist.gov/vuln/detail/CVE-2023-23626), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-23626 · Whole record: https://cve.day/CVE-2023-23626.json · Rebuilt by cve.day 2026-11-25T22:58:21.911Z
