LowGO-2021-0059CVE-2020-35380GHSA-w942-gw6m-p62c

Panic due to improper input validation in Get in github.com/tidwall/gjson

Published 14 Apr 2021 · Updated 20 May 2024

Is your project on an affected github.com/tidwall/gjson?

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 package

Affected
<1.6.4
Fixed in
1.6.4
Update to the fixed version for your release line, for example:go get github.com/tidwall/gjson@v1.6.4

Details

Due to improper bounds checking, maliciously crafted JSON objects can cause an out-of-bounds panic. If parsing user input, this may be used as a denial of service vector.

Is GO-2021-0059 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/tidwall/gjson, and gives you the command that fixes it.

More advisories for github.com/tidwall/gjson

  • HighCVE-2020-36067Improper Validation of Array Index in GJSON · 6 Feb 2023
  • LowCVE-2020-36066Denial of service via maliciously crafted JSON in github.com/tidwall/gjson · 25 Aug 2022
  • LowCVE-2021-42248Denial of service via maliciously crafted path in github.com/tidwall/gjson · 15 Aug 2022
  • HighCVE-2021-42248github.com/tidwall/gjson Vulnerable to REDoS attack · 25 Oct 2021
  • HighCVE-2020-36066github.com/tidwall/gjson is vulnerable to Denial of service · 18 May 2021
  • LowCVE-2020-36067Panic due to improper input validation in ForEach in github.com/tidwall/gjson · 14 Apr 2021
github.com/tidwall/gjson security overview

References

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