CVE-2020-36067: Panic due to improper input validation in github.com/tidwall/gjson

github.com/tidwall/gjson Updated 02 Oct 2025

Summary

14/04/2021
Yes i
High
7.5

CVE-2020-36067: Panic due to improper input validation in ForEach in github.com/tidwall/gjson. Affects github.com/tidwall/gjson versions < 1.6.6. Fixed in 1.6.6. How to fix ↓

Also tracked for

The same CVE-2020-36067 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package github.com/tidwall/gjson is a Go library that provides a fast and simple way to parse JSON data. It allows users to extract values from JSON documents using a simple query syntax. The package is widely used in Go applications for JSON parsing and manipulation.

Vulnerability Detail

The vulnerability (CVE-2020-36067) in github.com/tidwall/gjson arises from improper input validation. Maliciously crafted JSON objects can trigger an out-of-bounds panic due to inadequate bounds checking. If an application uses this package to parse user input, an attacker can exploit this vulnerability to cause a denial of service (DoS) attack. The impact of this vulnerability can be severe, as it can lead to application crashes and unavailability.

How To Fix

Latest published version: v1.20.0 as of 23 Oct 2026

go get github.com/tidwall/gjson@v1.20.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.6.6

This is the first release that contains the fix.

go get github.com/tidwall/gjson@v1.6.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to update to the fixed version of the package as soon as possible.

Conclusion

The vulnerability (CVE-2020-36067) in github.com/tidwall/gjson can be exploited to cause a denial of service (DoS) attack. It is crucial for developers to update their applications to use version 1.6.6 or later of the package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/tidwall/gjson →

Share this vulnerability

FAQ

The vulnerability can be exploited to cause a denial of service (DoS) attack by triggering an out-of-bounds panic. This can lead to application crashes and unavailability.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. It analyzes your Gopkg.lock file and alerts you in real-time for open-source vulnerabilities.

No, there is no known workaround. It is essential to update to the fixed version of the package.

There are no known public exploits for this vulnerability at the moment.

This vulnerability was discovered by @toptotu.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/tidwall/gjson.

How To Fix

Latest published version: v1.20.0 as of 23 Oct 2026

go get github.com/tidwall/gjson@v1.20.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.6.6

This is the first release that contains the fix.

go get github.com/tidwall/gjson@v1.6.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback