CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-6G7G-W4F8-9C9X

GHSA-6G7G-W4F8-9C9X: Denial of Service via Negative Slice Index in github.com/buger/jsonparser

Alon Barad
Alon Barad
Software Engineer

Mar 18, 2026·6 min read·98 visits

Executive Summary (TL;DR)

Unvalidated offset calculations in jsonparser's Delete function cause a runtime panic with malformed JSON, enabling Denial of Service attacks.

A denial-of-service vulnerability exists in github.com/buger/jsonparser up to version 1.1.1. The Delete function fails to validate offset bounds when processing malformed JSON, leading to a runtime panic and immediate process termination.

Vulnerability Overview

The github.com/buger/jsonparser package is a high-performance, zero-allocation JSON parsing library for Go. The library prioritizes performance by relying heavily on manual byte offset arithmetic rather than standard Go structures. A vulnerability exists in the Delete() function, which is responsible for removing specific keys from a JSON byte slice.

When the Delete() function processes specific malformed JSON fragments, the internal state machine calculates an invalid deletion boundary. The resulting offset computation produces a negative integer. This value is subsequently used as a slice index without prior bounds checking.

Go strictly enforces slice bounds at runtime. Attempting to slice an array or slice with a negative index triggers an immediate runtime error: slice bounds out of range panic. In Go applications, an unhandled panic terminates the executing process entirely, leading to a Denial of Service (DoS) condition.

Root Cause Analysis

The vulnerability stems from improper validation of calculated array indices within the Delete() function located in parser.go. The parser implements a custom state machine to traverse JSON structures and identify the start and end byte offsets of a requested key.

During the parsing of a structurally invalid JSON sequence, such as a missing closing brace or an isolated string missing a value separator, the parser misinterprets the structural boundaries. The logic responsible for calculating the end offset of the targeted key subtracts an incorrect length from the current position. This arithmetic error results in an offset variable value of -1.

At parser.go:729 in version 1.1.1, the function returns a newly constructed slice representing the JSON data without the deleted key. The operation executes return data[offset:]. Because offset equals -1, the Go runtime detects an out-of-bounds slice operation and panics. The defect occurs because the library trusts its internal parsing loop to yield valid, positive boundaries without performing a defensive bounds check before the slice operation.

Code Analysis

The vulnerable code path exists at the termination of the Delete() function. The implementation incorrectly assumes that all offsets generated by the parsing loop are mathematically valid for the provided byte slice.

// Vulnerable code in parser.go (version 1.1.1)
// The offset variable is derived from earlier calculations based on malformed input.
return data[offset:]

The required fix must explicitly validate the bounds of the offset variable before utilizing it in a slice operation. If the calculation yields a negative value, the function should return the original data unmodified, or handle the error gracefully without triggering a runtime panic.

// Suggested manual mitigation for parser.go:729
if offset < 0 {
    return data
}
return data[offset:]

This exact vulnerability pattern follows a similar historical flaw in the same function. CVE-2020-10675 involved an infinite loop within Delete() due to mishandled state tracking. The current issue demonstrates that while the infinite loop was patched in version 1.1.0, the broader boundary validation logic within Delete() remains incomplete.

Exploitation and Proof of Concept

Exploitation requires the attacker to supply a crafted, malformed JSON payload to an endpoint that processes untrusted input using jsonparser.Delete(). No authentication or specific network position is required beyond standard access to the vulnerable endpoint.

The proof-of-concept constructs a malformed JSON byte slice: "0":"0":. This string consists of key-value pairs lacking the standard JSON enclosing brackets and trailing structure. When the Delete() function attempts to remove the key "0", the internal state machine calculates the deletion boundary as -1.

package main
 
import (
    "fmt"
    "github.com/buger/jsonparser"
)
 
func main() {
    data := []byte(`"0":"0":`) 
    result := jsonparser.Delete(data, "0")
    fmt.Println(string(result))
}

Execution of this payload results in a deterministic crash. The Go runtime prints the panic stack trace: panic: runtime error: slice bounds out of range [-1:], specifying the exact file and line number (parser.go:729) before exiting with a non-zero status code.

Impact Assessment

The vulnerability carries a CVSS v3.1 base score of 7.5 (High), reflecting a severe impact on availability. The CVSS vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The defect does not compromise confidentiality or integrity, as memory is not leaked or corrupted before the process terminates.

The concrete security impact is a highly reliable application crash. Go web servers commonly handle distinct requests in separate goroutines. While individual goroutine panics can be caught using recover(), many applications do not implement global recovery middleware. In these environments, an unhandled panic in a single goroutine terminates the entire parent process.

This behavior is specifically impactful for systems designed for high-throughput processing, such as API gateways, logging agents, and data ingestion pipelines. These applications often select jsonparser specifically to bypass standard parsing overhead. A single malformed request from an unauthenticated attacker can effectively disable the entire service, requiring external process supervisors to restart it, causing service interruption and dropped traffic.

Execution Flow Diagram

The following diagram illustrates the execution flow from input ingestion to process termination.

Remediation and Mitigation Guidance

As of March 2026, there is no official patched release for github.com/buger/jsonparser. Version 1.1.1 remains the latest release and is vulnerable to this DoS condition. Organizations must implement compensating controls to prevent exploitation.

The most effective mitigation is implementing input validation before invoking the Delete() function. Developers should execute json.Valid() from the standard library to ensure structural integrity of the input. However, this approach negates the primary performance benefit of using a zero-allocation parser, as standard library validation incurs overhead.

Alternatively, Go applications must implement global panic recovery. Developers should wrap HTTP handlers or processing loops in middleware that utilizes the recover() function. This ensures that a panic within a single request context is caught, logged, and isolated, preventing the termination of the main application process. Organizations with strict performance requirements can implement the manual bounds check directly in a vendored copy of the library.

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Systems

Go applications utilizing github.com/buger/jsonparser <= 1.1.1API gateways and logging pipelines employing jsonparser.Delete() on unvalidated external input

Affected Versions Detail

Product
Affected Versions
Fixed Version
jsonparser
buger
<= 1.1.1-
AttributeDetail
CWE IDCWE-129
Attack VectorNetwork (Remote)
CVSS v3.17.5 (High)
ImpactDenial of Service (Process Termination)
Exploit StatusProof of Concept (PoC) Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-129
Improper Validation of Array Index

The product uses untrusted input as a calculation for an array index without proper validation, resulting in a negative index.

Known Exploits & Detection

GitHub IssueOriginal issue report containing the PoC with the specific malformed JSON fragment.

Vulnerability Timeline

Vulnerability discovered via coverage-guided fuzzing and reported to maintainer (Issue #275).
2026-02-19
Vulnerability reported to the Go Vulnerability Database (x/vulndb).
2026-02-19
Public disclosure and assignment of GitHub Security Advisory GHSA-6g7g-w4f8-9c9x.
2026-03-05

References & Sources

  • [1]GitHub Advisory: GHSA-6G7G-W4F8-9C9X
  • [2]Original Issue Report: buger/jsonparser#275
  • [3]Technical Analysis: Security Infinity
  • [4]Prior Related CVE: CVE-2020-10675
Related Vulnerabilities
CVE-2020-10675

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
5 views•5 min read
•about 2 hours ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
4 views•5 min read
•about 3 hours ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 4 hours ago•CVE-2026-81505
7.1

CVE-2026-81505: Broken Object Level Authorization (BOLA) in Convoy Webhook Source Retrieval

CVE-2026-81505 is a high-severity Broken Object Level Authorization (BOLA) / Insecure Direct Object Reference (IDOR) vulnerability in Convoy, a cloud-native webhooks gateway. In affected versions prior to 26.6.8, the single-item Source retrieval API endpoint authorizes project access but fails to confirm if the requested Source belongs to that specific project. This logical flaw allows authenticated users or project-scoped API key holders to bypass tenant isolation boundaries and retrieve unredacted, plaintext message broker credentials for Apache Kafka, Amazon SQS, RabbitMQ, and Google Cloud Pub/Sub belonging to other tenants. This issue is fully patched in version 26.6.8.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 5 hours ago•CVE-2026-77339
5.1

CVE-2026-77339: Unauthenticated Remote Command Execution in Process Compose via DNS Rebinding

CVE-2026-77339 is a critical security vulnerability in Process Compose before version 1.120.0. The Model Context Protocol (MCP) Server-Sent Events (SSE) listener transport subsystem fails to validate the HTTP Host and Origin headers, and does not enforce authentication. This omissions expose local loopback listeners to DNS rebinding attacks orchestrated by malicious remote websites visited by developers, enabling unauthorized process control and arbitrary command execution.

Alon Barad
Alon Barad
8 views•6 min read
•about 6 hours ago•CVE-2026-77301
7.5

CVE-2026-77301: Uncontrolled Resource Allocation (Decompression Bomb) in adm-zip

CVE-2026-77301 is a critical uncontrolled resource allocation vulnerability in the popular Node.js library adm-zip (versions prior to 0.6.1). During ZIP decompression of asynchronous entries, the library trusts the uncompressed size metadata declared in the central directory headers. Because Node.js's streaming zlib API completely ignores the maxOutputLength configuration, a crafted ZIP archive (decompression bomb) causes the application to continually allocate resident memory buffers on the heap without limits, causing rapid memory exhaustion and a process-level Out-of-Memory (OOM) crash.

Alon Barad
Alon Barad
6 views•5 min read