Every CVESearch/Get API key

GHSA-7632-4q2x-hvjw

Stack overflow when parsing deeply nested input in pest_grammars

3.3 LowFix available

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 dependencies and deep-nesting regression tests.

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 pest::set_call_limit() 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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
Low

What each source reports

OSV Score usedRUSTSEC-2026-03663.3

Stack overflow when parsing deeply nested input in pest_grammars

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 dependencies and deep-nesting regression tests.

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 pest::set_call_limit() 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.

Record
RUSTSEC-2026-0366
CVSS 3.1
3.3 LowCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02

Affected packages

Affected packages
PackageAffectedFixed
pest_grammars
crates.io
0.0.0-0 up to 2.9.3
2.9.3

History

History
RecordedChangedSources
first indexedOSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

GHSA-7632-4q2x-hvjw is a low vulnerability (CVSS 3.3) in pest_grammars, published October 16, 2026. No source lists public exploit code. Fixed in pest_grammars 2.9.3.

References

MoveEnter Open