Vulnerabilities

Vulnerability · RUSTSEC-2026-0366

Stack overflow when parsing deeply nested input in pest_grammars

Published Oct 16, 2026 · catalog updated Oct 16, 2026 · RustSec Rust

Open the advisory

Exploitation likelihood is not on this record for RUSTSEC-2026-0366. A missing EPSS score is not a low risk. Compare RustSec Rust with the linked advisory before you change production.

Severity
Low3.3
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
Awaiting synchronization with FIRST
Remediation
Advisory link
Affected products
crates.io pest_grammars

## 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).

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • crates.io pest_grammars0.0.0-0 → 2.9.3

How to fix RUSTSEC-2026-0366

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

Exploitation likelihood is not on this record for RUSTSEC-2026-0366. A missing EPSS score is not a low risk. Compare RustSec Rust with the linked advisory before you change production.

Which versions are affected?

Compare what you have installed with 0.0.0-0 → 2.9.3. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

No weakness class is stored. EPSS is not on this record yet. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

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

Sources

  • GitHub Advisory DatabasePackage advisoryGHSA-7632-4q2x-hvjw

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • OpenSSF OSV / OSV ScannerPackage advisoryRUSTSEC-2026-0366

    Stack overflow when parsing deeply nested input in pest_grammars

    osv.dev
  • RustSec Advisory DBVendor advisoryRUSTSEC-2026-0366

    ## 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 reproduct

    crates.io

References

Freshness

Last verified in this catalog Oct 16, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.