Miggo Logo

CVE-2023-23626:
IPFS go-bitfield vulnerable to DoS via malformed size arguments

5.9

CVSS Score
3.1

Basic Information

EPSS Score
0.40083%
Published
2/10/2023
Updated
6/13/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/ipfs/go-bitfieldgo< 1.1.01.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

  1. Advisory explicitly names NewBitfield and FromBytes as vulnerable entry points
  2. Commit diff shows both functions lacked proper size validation:
    • NewBitfield panicked on bad size
    • FromBytes called NewBitfield without error handling
    • FromBytes had separate panic for size mismatch
  3. CWE-1284 (input validation) and CWE-754 (exceptional condition checks) map directly to:
    • Missing validation for size%8==0 and size>=0
    • Reliance on panics instead of error handling
  4. Patch converted both functions to return errors instead of panicking
  5. Tests added for negative sizes and non-multiples of 8
  6. Workaround instructions specifically reference these two functions

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t W**n ****in* untrust** us*r input into t** siz* p*r*m*t*r o* `N*w*it*i*l*` *n* `*rom*yt*s` *un*tions, *n *tt**k*r **n tri***r `p*ni*`s. T*is **pp*n w**n t** `siz*` is * not * multipl* o* `*` or is n***tiv*. T**r* w*r* *lr***y * not* in t*

Reasoning

*. **visory *xpli*itly n*m*s N*w*it*i*l* *n* *rom*yt*s *s vuln*r**l* *ntry points *. *ommit *i** s*ows *ot* *un*tions l**k** prop*r siz* v*li**tion: - N*w*it*i*l* p*ni*k** on *** siz* - *rom*yt*s **ll** N*w*it*i*l* wit*out *rror **n*lin* - *