LowGO-2021-0265CVE-2021-42248CVE-2021-42836GHSA-c9gm-7rfj-8w5hGHSA-ppj4-34rq-v8j9

Denial of service via maliciously crafted path in github.com/tidwall/gjson

Published 15 Aug 2022 · 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.9.3
Fixed in
1.9.3
Update to the fixed version for your release line, for example:go get github.com/tidwall/gjson@v1.9.3

Details

A maliciously crafted path can cause Get and other query functions to consume excessive amounts of CPU and time.

Is GO-2021-0265 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
  • HighCVE-2020-35380Denial of service in GJSON · 23 Jun 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
  • LowCVE-2020-35380Panic due to improper input validation in Get 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.