CVE-2026-59990
Jawn: Uncontrolled nesting depth in JSON parser
Description
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 Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.typelevel » jawn-parser_2.12 | < 1.7.0 | 1.7.0 |
| org.typelevel » jawn-parser_2.13 | < 1.7.0 | 1.7.0 |
| org.typelevel » jawn-parser_3 | < 1.7.0 | 1.7.0 |
Blast radius
81% of the dependent artifacts (3,120) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 1,576 |
| 2 hops | 11,692 |
| 3 hops | 58,480 |
| 4 hops | 56,699 |
| 5 hops | 29,742 |
| 6 hops | 10,788 |
Most used dependents
- net.alchim31.maven » scala-maven-plugin3,328 usages
- com.typesafe.play » play-test1,902 usages
- io.circe » circe-parser1,656 usages
- com.typesafe.play » play-server1,436 usages
- com.typesafe.play » play-logback1,380 usages
- org.scalatestplus.play » scalatestplus-play1,286 usages
- org.scala-sbt » sbt1,240 usages
- com.typesafe.play » play-akka-http-server1,152 usages
- com.typesafe.play » filters-helpers1,129 usages
- com.typesafe.play » play-json1,088 usages
- com.typesafe.play » play1,025 usages
- com.typesafe.play » play-ws755 usages
- com.typesafe.play » play-ahc-ws693 usages
- com.typesafe.play » play-netty-server627 usages
- org.http4s » http4s-circe344 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/typelevel/jawn/security/advisories/GHSA-cc4v-rvgp-2pf3
- Webhttps://github.com/typelevel/jawn/commit/191cb3a44e77f1afab439ee636bf66bdf3c54a04
- Webhttps://github.com/typelevel/jawn/commit/6219666641f9408498f85868f835e17bd8a72fed
- Webhttps://github.com/typelevel/jawn/commit/93ac93e9c992c11b4c03d5455d8551f9fb24da1b
- Webhttps://github.com/typelevel/jawn/commit/f6ace7e0db715de1a8c4618bed9378333a5c2214
- Packagehttps://github.com/typelevel/jawn
- Webhttps://github.com/typelevel/jawn/releases/tag/v1.7.0
