VDB
Sign up
MEDIUM6.5

GHSA-m3xc-h892-ggx6

go-billy: Lack of depth and cycle detection in symlink resolution may lead to infinite loops and resource exhaustion

Quick fix

GHSA-m3xc-h892-ggx6 — github.com/go-git/go-billy/v5: upgrade to the fixed version with the command below.

go get github.com/go-git/go-billy/v5@v5.9.0

Details

### Impact Multiple components may improperly handle crafted or malformed input, resulting in panics, infinite loops, uncontrolled recursion, or excessive resource consumption.

These issues arise from insufficient validation and missing safety mechanisms such as cycle detection, recursion limits, or defensive handling of unexpected states when processing untrusted repository data and filesystem structures.

### Patches Users should upgrade to a patched version in order to mitigate this vulnerability. Versions prior to `v5` are likely to be affected, users are recommended to upgrade to a supported `go-billy` version.

### Credits Thanks to @faran66 for finding and reporting this issue privately to the go-git project. 🙇

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/github.com/go-git/go-billy/v5
Introduced in: 0Fixed in: 5.9.0
Fixgo get github.com/go-git/go-billy/v5@v5.9.0
Go/github.com/go-git/go-billy/v6
Introduced in: 0Fixed in: 6.0.0-alpha.1
Fixgo get github.com/go-git/go-billy/v6@v6.0.0-alpha.1

References