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·79 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

•12 minutes ago•CVE-2026-70593
6.6

CVE-2026-70593: Path Traversal and Arbitrary File Write via Custom Theme Upload in Ghost CMS

CVE-2026-70593 is a path traversal and arbitrary file write vulnerability affecting Ghost CMS. Versions from 0.10.0 up to 6.54.0 are vulnerable. Authenticated administrators can exploit this flaw by uploading a custom theme in a ZIP archive that contains path traversal characters. The vulnerability is mitigated in version 6.54.1.

Alon Barad
Alon Barad
1 views•5 min read
•about 1 hour ago•CVE-2026-70594
6.7

CVE-2026-70594: Session Fixation in Ghost Admin Panel

A critical session fixation vulnerability exists in the Ghost Admin panel from version 2.2.0 until 6.54.1. The Express-based authentication backend fails to invalidate or rotate the session identifier during login, allowing attackers to hijack administrative sessions.

Alon Barad
Alon Barad
1 views•5 min read
•about 2 hours ago•CVE-2026-53950
7.5

CVE-2026-53950: DOM-based Cross-Site Scripting in @tryghost/activitypub

A high-severity Cross-Site Scripting (XSS) vulnerability was identified in the @tryghost/activitypub package, the social and federation client library for the Ghost publishing platform. Prior to version 3.1.0, the ActivityPub client rendered incoming federated posts from external servers directly in the web user interface without proper sanitization. A maliciously customized ActivityPub server federated with a Ghost instance could transmit crafted posts containing embedded HTML payloads. When viewed by a user inside the ActivityPub client interface, the browser executes the injected JavaScript within the security context of the Ghost application domain.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 3 hours ago•CVE-2026-53947
5.3

CVE-2026-53947: Observable Response Discrepancy (User Enumeration) in Ghost CMS

CVE-2026-53947 is an observable response discrepancy (CWE-204) in Ghost CMS that permits unauthenticated remote user enumeration via the passwordless magic link sign-in endpoint.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 4 hours ago•CVE-2026-59817
5.3

CVE-2026-59817: Premium Membership Provisioning Bypass via Parameter Tampering in Ghost CMS

An unauthenticated remote business logic vulnerability in Ghost CMS versions 6.27.0 through 6.43.1 allows attackers to bypass paid subscription gates. By injecting reserved metadata fields into public donation Stripe Checkout Sessions, attackers can obtain premium-tier memberships for arbitrary nominal amounts.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 5 hours ago•CVE-2026-70494
8.1

CVE-2026-70494: Broken Access Control in Open WebUI Folder Deletion Endpoint

A critical broken access control vulnerability in Open WebUI (v0.10.0 to v0.11.0) allows authenticated write-collaborators to delete shared subfolders they do not own. Because deletion triggers a backend cascade using the folder owner's identity, this results in unauthorized permanent deletion of the owner's nested chats, messages, and files.

Alon Barad
Alon Barad
4 views•7 min read