Denial of Service Vulnerability in GJSON Package (CVE-2020-36066)

golang-github-tidwall-gjson Updated 02 Oct 2025

Summary

05/01/2021
N/A
Yes i
High
7.5

CVE-2020-36066: GJSON. Affects golang-github-tidwall-gjson across 2 version ranges.

< 1.6.7-1 < 9f58baa7a613f89dfdc764c39e47fd3a15606153

Fixed in 1.6.7-1. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

GJSON is a Go library designed for fast JSON parsing. It allows developers to easily extract values from JSON documents with a simple syntax. The library is widely used in various applications due to its performance and ease of use. However, it has a vulnerability that can be exploited to cause a denial of service, impacting applications that rely on it.

Vulnerability Detail

The vulnerability identified as CVE-2020-36066 affects GJSON versions prior to 1.6.5. Attackers can exploit this vulnerability by sending crafted JSON data that can lead to a denial of service. This can result in the application becoming unresponsive or crashing, affecting the availability of services that depend on GJSON for JSON parsing. The vulnerability arises from insufficient validation of JSON input, allowing maliciously crafted data to overwhelm the parser.

How To Fix

Minimum fixed version

1.6.7-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade golang-github-tidwall-gjson

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

Workaround

If immediate upgrading is not feasible, consider implementing input validation to sanitize JSON data before processing it with GJSON. This can help mitigate the risk of denial of service attacks. For example, you can limit the size of the JSON input or check for specific patterns that indicate malicious content.

Conclusion

CVE-2020-36066 is a significant vulnerability in the GJSON package that can lead to denial of service attacks. It is crucial for developers using this package to update to version 1.6.7 or later to mitigate the risk. Additionally, implementing input validation can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for golang-github-tidwall-gjson →

Share this vulnerability

FAQ

CVE-2020-36066 is a vulnerability in the GJSON package that allows attackers to cause a denial of service through crafted JSON input.

GJSON versions prior to 1.6.5 are affected by this vulnerability.

Exploiting this vulnerability can lead to denial of service, causing applications to become unresponsive or crash.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

The CVSS score for CVE-2020-36066 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for golang-github-tidwall-gjson.

How To Fix

Minimum fixed version

1.6.7-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade golang-github-tidwall-gjson

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