Back to Blog
critical SEVERITY6 min read

How Denial of Service via Malformed JSON Input happens in Go and how to fix it

A Denial of Service vulnerability (CVE-2026-32285) was discovered in the `github.com/buger/jsonparser` dependency used by this Go application, where crafted malformed JSON input could cause the parser to crash or hang, potentially taking down any service that processes untrusted JSON. The fix upgrades the dependency from v1.1.1 to v1.1.2 in `go.mod` and `go.sum`, closing the attack vector without changing any valid-input behavior. This is a practical reminder that transitive dependencies carry r

O
By Orbis AppSec
•Technically reviewed by Anupam Mediratta•Published August 26, 2026•Reviewed August 26, 2026

Answer Summary

CVE-2026-32285 is a Denial of Service vulnerability (CWE-400: Uncontrolled Resource Consumption) in the Go library `github.com/buger/jsonparser` v1.1.1, where specially crafted malformed JSON input can cause the parser to crash or consume excessive resources, disrupting any Go service that processes untrusted JSON. The fix is a one-line upgrade in `go.mod` from `github.com/buger/jsonparser v1.1.1` to `v1.1.2`, accompanied by updated checksums in `go.sum`. Developers should audit all indirect Go dependencies for known CVEs using tools like `govulncheck` or Trivy, since vulnerable transitive dependencies are just as dangerous as vulnerable first-party code.

Vulnerability at a Glance

cweCWE-400
fixUpgrade github.com/buger/jsonparser from v1.1.1 to v1.1.2 in go.mod and go.sum
riskAn attacker supplying malformed JSON to any endpoint that uses buger/jsonparser can crash or hang the service
languageGo
root causebuger/jsonparser v1.1.1 does not safely handle certain malformed JSON byte sequences, leading to uncontrolled resource consumption or panic
vulnerabilityDenial of Service via Malformed JSON Input

Introduction

The go.mod file in any Go project is deceptively simple — a list of module names and version pins. But each line is a trust decision. When the Trivy scanner flagged github.com/buger/jsonparser v1.1.1 in this project's dependency tree, it revealed that a single indirect dependency version pin was exposing every JSON-parsing code path to a potential Denial of Service attack.

This post walks through exactly what CVE-2026-32285 is, how the vulnerable version of buger/jsonparser could be exploited against a running Go service, and what the one-line go.mod change actually does to close the door.


The Vulnerability Explained

What is buger/jsonparser and why is it here?

github.com/buger/jsonparser is a high-performance, zero-allocation JSON parsing library for Go. It is widely used as a transitive dependency — meaning your code may not call it directly, but another library in your dependency graph does. In this project it appears as an // indirect dependency:

// go.mod (before fix)
github.com/buger/jsonparser v1.1.1 // indirect

The // indirect comment is Go's way of saying: "We don't import this ourselves, but something we depend on does." That does not mean the vulnerability is unreachable — it means the attack surface is wherever the parent dependency passes untrusted data through jsonparser.

CVE-2026-32285: Denial of Service via Malformed JSON

In buger/jsonparser v1.1.1, certain sequences of malformed or truncated JSON bytes are not handled defensively. When the parser encounters these sequences, it can:

  • Panic — causing the Go runtime to crash the goroutine (or the whole process if not recovered)
  • Loop or stall — consuming CPU in an uncontrolled way (CWE-400: Uncontrolled Resource Consumption)

The root cause is insufficient bounds-checking and error-path handling inside the library's byte-level parsing routines when input does not conform to expected JSON structure.

A Concrete Attack Scenario

Consider a Go service that accepts JSON payloads over HTTP — a REST API endpoint, a webhook receiver, or a message queue consumer. Internally, one of its dependencies uses buger/jsonparser to extract fields from those payloads.

An attacker sends a crafted HTTP request body:

POST /api/ingest HTTP/1.1
Content-Type: application/json

{"key": "\x00\xff\xfe

This truncated, byte-mangled payload is valid enough to pass a naive Content-Type check but malformed enough to trigger the vulnerable code path inside buger/jsonparser v1.1.1. The result: the parsing goroutine panics or stalls. With enough concurrent requests, the service becomes unavailable — a classic application-layer DoS.

Because buger/jsonparser is an indirect dependency, developers often don't realize their service is exposed until a scanner like Trivy surfaces it.


The Fix

The fix is surgical and low-risk: bump github.com/buger/jsonparser from v1.1.1 to v1.1.2 in both go.mod and go.sum.

go.mod Change

- github.com/buger/jsonparser v1.1.1 // indirect
+ github.com/buger/jsonparser v1.1.2 // indirect

v1.1.2 patches the malformed-input handling so that the parser returns a proper error instead of panicking or looping. Valid JSON inputs are completely unaffected — the change only tightens behavior on the invalid-input path.

go.sum Change

+ github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk=
+ github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=

The go.sum file stores cryptographic hashes (SHA-256) of every module version that enters the build. Adding the v1.1.2 hashes here is mandatory: Go's module system will refuse to use a version whose hash is not recorded in go.sum, preventing supply-chain tampering. The old v1.1.1 entries remain in go.sum for historical auditability but are no longer selected by the build.

Why Two Files?

File Role What Changed
go.mod Declares the minimum required version Version pin updated from v1.1.1 → v1.1.2
go.sum Cryptographic integrity ledger Hash entries for v1.1.2 appended

Both changes are required. Updating only go.mod without go.sum would cause go build to fail with a checksum mismatch error.


Key Takeaways

  • Indirect Go dependencies carry real CVE risk. The // indirect label in go.mod does not mean "safe to ignore" — it means your attack surface includes code you didn't write and may not have reviewed.
  • go.sum is a security control, not just bookkeeping. The hash entries for v1.1.2 ensure the exact patched bytes are used at build time; never skip updating go.sum when changing go.mod.
  • Malformed JSON DoS is a realistic threat for any HTTP-facing Go service. If your service accepts JSON from untrusted clients, the parsing library version matters as much as your own input-validation logic.
  • govulncheck can tell you if the vulnerable symbol is actually reachable, saving triage time when you have many flagged indirect dependencies.
  • A one-line version bump in go.mod closed a critical availability gap — the cost of the fix was near zero; the cost of ignoring it could have been a production outage.

How Orbis AppSec Detected This

  • Source: Any HTTP endpoint or message consumer in the application that accepts untrusted JSON payloads and routes them through a dependency that calls buger/jsonparser.
  • Sink: The byte-parsing routines inside github.com/buger/jsonparser v1.1.1 that process raw JSON bytes without adequate bounds-checking on malformed input sequences.
  • Missing control: No version constraint in go.mod required the patched v1.1.2 release; the project was locked to the vulnerable v1.1.1.
  • CWE: CWE-400 — Uncontrolled Resource Consumption.
  • Fix: Updated go.mod to require github.com/buger/jsonparser v1.1.2 and added the corresponding cryptographic checksums to go.sum.

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.


Conclusion

CVE-2026-32285 is a textbook example of why dependency hygiene is a security practice, not just a maintenance chore. The vulnerable code wasn't written by the application team — it lived two layers deep in the dependency graph — but it was fully capable of taking down the service. The fix required changing exactly one version string in go.mod and adding two lines to go.sum. That's a remarkably low cost for closing an availability risk that could have manifested as a production incident.

The broader lesson: treat every line in go.mod as a security decision. Automate scanning, enforce version floors in CI, and don't let // indirect lull you into a false sense of safety.


Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #2

Related Articles

high

MapManager.get() Race Condition Duplicates API Requests

The MapManager's `get(mapUid, cache)` method used a check-then-act pattern that permitted multiple concurrent requests to pass the cache miss check simultaneously, triggering redundant API calls and risking cache corruption. The fix introduces a `_pending` promise map to deduplicate in-flight fetches for identical map UIDs.

critical

Lampa Desktop Auto-Update Heuristic Bypass: Execution of Unverified

Lampa Desktop's auto-update mechanism downloaded JavaScript and CSS from `raw.githubusercontent.com` using only heuristic validation—file size thresholds and string pattern matching—that attackers could trivially satisfy. The fix introduces cryptographic integrity verification by cross-referencing Git blob hashes from the GitHub Contents API, ensuring downloaded code matches the repository's authoritative state before execution.

high

adm-zip 0.6.0 Preserves SUID Bits From ZIPs: CVE-2026-102282

The `adm-zip` dependency resolved to 0.6.0 in this project's dependency tree, a version affected by CVE-2026-102282: during extraction it applies the Unix permission bits stored in each ZIP entry's external file attributes verbatim, including the setuid (`04000`), setgid (`02000`), and sticky bits. An attacker who controls an archive passed to `extractAllTo()` or `extractEntryTo()` can therefore have the extractor create a setuid binary owned by whatever user the extraction process runs as. The

high

requestInput() Type Confusion: NaN and Object Bypass in JavaScript

The `requestInput()` utility function lacked validation on its `type` parameter and failed to handle `NaN` results from float conversions, creating a type confusion weakness. An attacker could supply malformed inputs that propagate unhandled `NaN` values or unexpected object types through the type system. The fix adds explicit guards against `NaN` type parameters and rejects non-primitive type values.

critical

No Rate Limit on /api/uploads/presign Enables DoS

The `/api/uploads/presign` endpoint accepted unlimited concurrent requests to generate storage presigned URLs, giving an attacker a free lever to exhaust storage-provider quotas and server resources. The fix adds an `express-rate-limit` middleware capping each client to 30 requests per minute on that route.

high

CVE-2026-54673: builder-util-runtime Leaks Auth Headers on Redirect

electron-updater and electron-builder rely on builder-util-runtime to fetch update manifests and artifacts over HTTP. A flaw in that shared HTTP executor allowed credential headers attached to the original update-feed request to be re-sent after a redirect, exposing them to any host the redirect pointed to. The project fixes this by upgrading builder-util-runtime to 9.7.0 and collapsing a duplicate, older copy of the package that electron-updater had pinned on its own.