High

Jawn: Uncontrolled nesting depth in JSON parser

  • Disclosed: 23.09.2026
  • Updated: 11.10.2026 13:20

The Jawn parser before 1.6.1 is vulnerable to a denial of service attack via untrusted input.

Impact

A remote attacker who can submit JSON to any jawn-backed parse method can exhaust JVM heap and trigger java.lang.OutOfMemoryError. This is treated by Scala as a fatal error and not typically handled by scala.util.Try or cats.effect.IO.

Patches

Version 1.6.1 introduces a configurable nesting-depth limit (Parser#maxDepth, default 4096). Inputs deeper than the limit fail with a recoverable ParseException instead of exhausting heap.

Users who require deeper nesting may override maxDepth on a Parser subclass.

Workarounds

  • Enforce an input size limit small enough that the resulting context stack cannot exhaust heap, (e.g. http4s EntityLimiter).
  • Pre-scan untrusted input and reject documents whose maximum delimiter nesting exceeds a threshold before handing them to jawn.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.typelevel:jawn-parser_2.12 < 1.7.0 1.7.0
Java / Kotlin (Maven) org.typelevel:jawn-parser_2.13 < 1.7.0 1.7.0
Java / Kotlin (Maven) org.typelevel:jawn-parser_3 < 1.7.0 1.7.0

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness (CWE)
CWE-770
Platform
Java / Kotlin (Maven)
Package
org.typelevel:jawn-parser_2.12, org.typelevel:jawn-parser_2.13, org.typelevel:jawn-parser_3
Disclosed
23.09.2026
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-cc4v-rvgp-2pf3 - CC BY 4.0

Vulnerability history: org.typelevel:jawn-parser_2.13

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
01.2022 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 2
  • Medium 1

Disclosures per year

  1. 2022: 1
  2. 2023: 0
  3. 2024: 0
  4. 2025: 0
  5. 2026: 2
  1. High · 7.5 CVE-2026-61814 < 1.7.0 1.7.0
  2. Jawn: Uncontrolled nesting depth in JSON parser this entry
    High · 7.5 CVE-2026-59990 < 1.7.0 1.7.0
  3. Medium · 5.9 CVE-2022-21653 < 1.3.2 1.3.2

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.