LowGO-2022-0503GHSA-9x4h-8wgm-8xfg

Denial of service via malformed CAR data in github.com/ipld/go-car and go-car/v2

Published 30 Jul 2022 · Updated 20 May 2024

Is your project on an affected github.com/ipld/go-car?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<0.4.0
Fixed in
0.4.0
Update to the fixed version for your release line, for example:go get github.com/ipld/go-car@v0.4.0
Affected
>=2.0.0 <2.4.0
Fixed in
2.4.0
Update to the fixed version for your release line, for example:go get github.com/ipld/go-car/v2@v2.4.0

Details

Decoding malformed CAR data can cause panics or excessive memory usage.

Is GO-2022-0503 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/ipld/go-car, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.