Low, CVSS 3.3crates.ioPublished
Stack overflow when parsing deeply nested input in pest_grammars
GHSA-7632-4q2x-hvjw
- Affected
- crates.io pest_grammars >= 0.0.0-0, < 2.9.3
- Fixed in
- 2.9.3· Vendor fix available
- Issue
- Impact In affected versions, parsing deeply nested input with `pest_grammars::json::JsonParser` can exhaust the native stack and abort the hosting process. Applications that accept attacker-controlled JSON without suitable resource limits may therefore be vulnerable to denial of service. The reported reproduction demonstrates this behavior with deeply nested JSON arrays. The nesting required to trigger an overflow depends on the platform, available stack space, and build configuration; there is no portable safe nesting threshold. Patches Upgrade to `pest_grammars` 2.9.3 or later. Version 2.9.3 requires the updated `pest` runtime and includes regression tests for deeply nested JSON with the optional call budget disabled. Supported std builds automatically check available native stack headroom at parser checkpoints and return a handled stack limit reached error when insufficient space is detected. This protection operates independently of `pest::set_call_limit()`. See the 2.9.3…
Recommended action: Upgrade to 2.9.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.