Executive brief
Jawn is a widely-used JSON parsing library. Its AsyncParser component suffers from an algorithmic flaw that causes it to perform quadratic (O(n²)) work when processing large JSON tokens split across many small network chunks. An attacker who can send malicious JSON input with controlled chunk sizes can exhaust CPU resources, causing a denial-of-service condition in any application using AsyncParser for untrusted data.
Technical details
The vulnerability is an algorithmic complexity flaw (CWE-407) in the AsyncParser component of Jawn. When a single JSON token arrives fragmented across many small network chunks, each call to the `absorb()` method rescans the incomplete token from the beginning rather than continuing from where the previous chunk left off, resulting in quadratic time complexity O(n²) with respect to token length. An attacker with the ability to control network transmission chunk sizes—or any network-accessible application parsing untrusted JSON—can trigger this behavior. The attack requires no authentication or user interaction; an unauthenticated remote attacker can send crafted JSON payloads to exhaust CPU and cause denial of service. The vulnerability was fixed in jawn-parser version 1.7.0.
Affected products
- Typelevel Jawn ≤ 1.6.0
Timeline
- 2026-06-24: disclosed
- 2026-06-24: patched: Fixed in version 1.7.0
- 2026-09-23: advisory