{"id":"GHSA-2h6c-j3gf-xp9r","revision":"c05b4d0f2a90454dabdbd1d404ce5107","records":[{"revision":"c05b4d0f2a90454dabdbd1d404ce5107","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-2h6c-j3gf-xp9r","aliases":["CVE-2023-23626","GO-2023-1558"],"title":"IPFS go-bitfield vulnerable to DoS via malformed size arguments","description":"### 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","state":0,"publishedAt":"2023-02-10T19:52:45+00:00","modifiedAt":"2026-09-10T03:49:51.7509519+00:00","affected":[{"ecosystem":"Go","name":"github.com/ipfs/go-bitfield","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.1.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r","https://nvd.nist.gov/vuln/detail/CVE-2023-23626","https://github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579","https://github.com/ipfs/go-bitfield","https://pkg.go.dev/vuln/GO-2023-1558"],"sourceUrl":"https://github.com/advisories/GHSA-2h6c-j3gf-xp9r","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-2h6c-j3gf-xp9r","identifiers":["GHSA-2h6c-j3gf-xp9r","CVE-2023-23626","GO-2023-1558"]},"retained":false,"historicalAffected":[]}],"coverage":[]}