VDB
Sign up
MEDIUM6.9

GHSA-vvm8-gf78-28g4

Go JOSE: Panics in JSON parsing

Quick fix

GHSA-vvm8-gf78-28g4 — github.com/go-jose/go-jose/v4: upgrade to the fixed version with the command below.

go get github.com/go-jose/go-jose/v4@v4.1.5

Details

### Summary

Parsing deeply nested JSON structures can hit Go's stack limit, causing the application to crash.

Note: this advisory is the same as https://github.com/go-jose/go-jose/security/advisories/GHSA-6mp9-8xrw-74r4.

### Impact

Denial of service vulnerability. Any application that parses untrusted JSON via go-jose is exposed.

### Workarounds

Reject large inputs before parsing them.

### Acknowledgements

Thanks to Dohyun Kim (@azza999), Joshua Rogers of AISLE Research, and Sueun Cho for alerting us to the need to patch this.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/github.com/go-jose/go-jose/v4
Introduced in: 0Fixed in: 4.1.5
Fixgo get github.com/go-jose/go-jose/v4@v4.1.5
Go/github.com/go-jose/go-jose/v3
Introduced in: 0

No fixed version published yet for github.com/go-jose/go-jose/v3 (go modules). Pin to a known-safe version or switch to an alternative.

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:golang/github.com/go-jose/go-jose/v4"]}'