{"schemaVersion":3,"id":"CVE-2023-23626","aliases":["GHSA-2h6c-j3gf-xp9r","GO-2023-1558"],"status":"published","duplicateOf":null,"title":null,"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`.","dates":{"published":"2023-02-09T20:54:07.075Z","modified":"2025-03-10T21:14:05.485Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Go","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","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.0091,"percentile":0.5932,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.0091},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.0091,"percentile":0.5932}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0091,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.0091,"percentile":0.5932}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_IPFS_GO-BITFIELD","name":"Go Bitfield","source":"github","url":"https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-754","name":"Improper Check for Unusual or Exceptional Conditions","description":"The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/754.html"},{"id":"CWE-1284","name":"Improper Validation of Specified Quantity in Input","description":"The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/1284.html"}],"affected":[{"vendor":"github.com/ipfs","product":"go-bitfield","name":"github.com/ipfs/go-bitfield","label":"go-bitfield","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/ipfs/go-bitfield","purlType":"golang","versions":[{"text":"< 1.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.1.0","eol":null,"hubHref":null},{"vendor":"ipfs","product":"go-bitfield","name":"go-bitfield","label":"go-bitfield","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.1.0","eol":null,"hubHref":"/vendor/ipfs/go-bitfield"},{"vendor":"protocol","product":"go-bitfield","name":"go-bitfield","label":"go-bitfield","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.1.0","eol":null,"hubHref":"/vendor/protocol/go-bitfield"}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r","label":"github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","Exploit","Patch","Vendor Advisory"]},{"url":"https://github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579","label":"github.com/ipfs/go-bitfield/commit/5e1d256fe043fc4163343ccca83862c69c52e579","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","Patch"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-23626","label":"nvd.nist.gov/vuln/detail/CVE-2023-23626","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/ipfs/go-bitfield","label":"github.com/ipfs/go-bitfield","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pkg.go.dev/vuln/GO-2023-1558","label":"pkg.go.dev/vuln/GO-2023-1558","hostname":"pkg.go.dev","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2023-02-09T20:54:07.075Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-03-10T21:14:05.485Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":40,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T12:20:18.484Z","stale":false,"partial":false}}