Findings

RUSTSEC-2026-0366

Stack overflow when parsing deeply nested input in pest_grammars

Published Oct 16, 2026 · corrected/updated Oct 16, 2026 · evidence confidence medium

## Impact In affected versions, parsing deeply nested input with 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 2.9.3 or later. Version 2.9.3 requires the updated 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 . See the [2.9.3 dependencies](https://github.com/pest-parser/pest/blob/v2.9.3/grammars/Cargo.toml#L16-L18) and [deep-nesting regression tests](https://github.com/pest-parser/pest/blob/v2.9.3/grammars/src/lib.rs#L94-L215). These checks are best-effort. They do not provide universal stack-overflow protection, apply when stack bounds cannot be determined, or provide native-stack protection in no_std builds. ## Workarounds and defense in depth Applications unable to upgrade should reject excessive nesting before invoking the affected parser or configure a suitably conservative budget. A call budget is not a portable stack-depth guarantee. Even after upgrading, applications parsing untrusted input should enforce workload-appropriate input, work, memory, and concurrency limits. Stack checks and call budgets do not enforce elapsed-time deadlines. Where a hard deadline or cancellation is required, use supervised parsing as described in the [security policy: Parsing Untrusted Input](https://github.com/pest-parser/pest/security/policy#parsing-untrusted-input).

Grounded briefings

Catalog interpretations for three audiences. Each brief cites ingested metadata and the original advisories below. They are not independent research and they do not invent exploit steps.

Executive

RUSTSEC-2026-0366 is a low public vulnerability record for this product. It is not currently listed in the CISA Known Exploited catalog. Check the linked vendor or CERT advisories for patch status. This summary is a catalog interpretation of the ingested metadata and cites the original advisories below.

System administrator

Identify whether this product is in your estate, then compare installed versions with the affected ranges. Affected packages or ranges on record: pest_grammars (0.0.0-0 → 2.9.3). Check the linked vendor or CERT advisories for patch status. Prefer the vendor or distribution advisory linked in Sources before changing production systems. This is a catalog interpretation, not a runbook.

Security analyst

Signals on file: CVSS 3.3. It is not currently listed in the CISA Known Exploited catalog. Sources contributing to this record: github, osv. Public exploit references, when present, are outbound links only and are not proof of active exploitation. This is a catalog interpretation of stored metadata.

Exploitation and remediation

  • Exploitation evidence

    Not listed as known exploited in CISA KEV. Not in CISA KEV or VulnCheck KEV.

  • Patch and remediation

    No required-action text is stored yet. Use the vendor or CERT links in Sources for patch availability.

  • Safe detection guidance

    Compare installed versions with the affected ranges below and verify the advisory from the original publisher. This site stores metadata and outbound links only; it does not ship exploit code or proof-of-concept payloads.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 16, 2026 · GitHub Advisory Database

    Detected

    ## Impact In affected versions, parsing deeply nested input with 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 th

  2. Oct 16, 2026 · GitHub Advisory Database

    Fix available

    pest_grammars fixed in 2.9.3

  3. Oct 16, 2026 · GitHub Advisory Database

    Fix available

    pest_grammars fixed in 2.9.3

  4. Oct 16, 2026 · GitHub Advisory Database

    Updated

    ## Impact In affected versions, parsing deeply nested input with 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 th

Affected

  • crates.io pest_grammars0.0.0-0 → 2.9.3

Sources

References