{"id":"CVE-2023-23626","aliases":["GHSA-2h6c-j3gf-xp9r","GO-2023-1558"],"url":"https://o3.security/vulnerability/CVE-2023-23626","summary":"Denial of service when feeding malformed size arguments in go-bitfield","details":"### Impact\nWhen feeding untrusted user input into the size parameter of `NewBitfield` and `FromBytes` functions, an attacker can trigger `panic`s.\n\nThis happen when the `size` is a not a multiple of `8` or is negative.\nThere were already a note in the `NewBitfield` documentation:\n> ```\n> Panics if size is not a multiple of 8.\n> ````\n\nBut it incomplete and missing from `FromBytes`'s documentation.\n\nThis has been replaced by returning an `(Bitfield, error)` and returning a non nil error if the size is wrong.\n\n### Patches\n- https://github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579\n\n### Workarounds\n- Ensure `size%8 == 0 && size >= 0` yourself before calling `NewBitfield` or `FromBytes`\n\n### References\n- https://github.com/ipfs/go-unixfs/security/advisories/GHSA-q264-w97q-q778\n","published":"2023-02-09T20:54:07.075Z","modified":"2026-10-28T02:30:56.812778560Z","cvss":{"score":5.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"github.com/ipfs/go-bitfield","fixedVersion":"1.1.0"}],"fix":{"url":"https://github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579","label":"ipfs/go-bitfield@5e1d256"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23626.json"},{"type":"ADVISORY","url":"https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-23626"},{"type":"FIX","url":"https://github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579"},{"type":"PACKAGE","url":"https://github.com/ipfs/go-bitfield"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2023-1558"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:56.812778560Z"}}