{"answers":{"affected":"1 open source package ship an affected version, including pest_grammars.","exploited":"There is no known exploitation of RUSTSEC-2026-0366 in the wild and no public exploit code.","fix":"Upgrade pest_grammars to 2.9.3 or later.","what":"RUSTSEC-2026-0366 is a denial of service vulnerability in pest_grammars, published on 16 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0366 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0366 is a denial of service vulnerability in pest_grammars, published on 16 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of RUSTSEC-2026-0366 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pest_grammars (crates.io): affected from 0.0.0-0; fixed in 2.9.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/RUSTSEC-2026-0366/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0366/index.md)","id":"RUSTSEC-2026-0366","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0366/index.md","name":"RUSTSEC-2026-0366","record":{"aliases":["GHSA-7632-4q2x-hvjw"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust JSON parser library","requires_auth":"none","summary":"Attackers can cause denial of service by sending deeply nested JSON to applications using the pest_grammars library, crashing the process via stack overflow.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Impact\n\nIn 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.\n\nThe 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.\n\n## Patches\n\nUpgrade to `pest_grammars` 2.9.3 or later.\n\nVersion 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](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).\n\nThese 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.\n\n## Workarounds and defense in depth\n\nApplications 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.\n\nEven 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).","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Stack overflow when parsing deeply nested input in pest_grammars","id":"RUSTSEC-2026-0366","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["2.9.3"],"introduced":["0.0.0-0"],"last_affected":[],"package":"pest_grammars","purl":"pkg:cargo/pest_grammars","source":"RUSTSEC-2026-0366"}],"products":null,"published":"2026-10-16","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can cause denial of service by sending deeply nested JSON to applications using the pest_grammars library, crashing the process via stack overflow.","url":"https://insights.sbomify.com/RUSTSEC-2026-0366/"}