{"id":"GHSA-7632-4q2x-hvjw","revision":null,"records":[{"revision":"1fe0cb13548d4cfa83b165599f5be816","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0366","aliases":["GHSA-7632-4q2x-hvjw"],"title":"Stack overflow when parsing deeply nested input in pest_grammars","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).","state":0,"publishedAt":"2026-10-16T12:00:00+00:00","modifiedAt":"2026-10-16T23:30:02.3859725+00:00","affected":[{"ecosystem":"crates.io","name":"pest_grammars","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"2.9.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","score":null,"severity":null}],"references":["https://crates.io/crates/pest_grammars","https://rustsec.org/advisories/RUSTSEC-2026-0366.html","https://github.com/pest-parser/pest/pull/1212"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0366","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0366","identifiers":["RUSTSEC-2026-0366","GHSA-7632-4q2x-hvjw"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-09T08:02:26.2193293+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-09T08:02:26.2193293+00:00","lastSuccessAt":"2026-11-09T08:02:26.3903284+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:02:26.3903314+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-24e6fde7b744113daefb8f6135035fb8a5c69c9617c9c0d40574a0376532ffd3-bac7baae6881807b2b4a9dce5cf5dd63af98be3e5c79f031b11fd288ebb8cee0","complete":true,"records":421301,"lastAttemptAt":"2026-11-09T08:02:25.6827821+00:00","lastSuccessAt":"2026-11-09T07:02:22.9878009+00:00","error":"HttpRequestException","lastVerifiedAt":"2026-11-09T07:02:23.0094052+00:00","snapshotPublishedAt":"2026-11-09T06:27:21+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-78bb883a508a4395862310ad4dcc6822","complete":false,"records":13654,"lastAttemptAt":"2026-11-09T08:09:12.2668203+00:00","lastSuccessAt":"2026-11-09T08:09:12.4308691+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:09:12.4308691+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-09T08:02:26.2193293+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-09T08:02:26.2193293+00:00","lastSuccessAt":"2026-11-09T08:02:26.3910394+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:02:26.3910397+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-156d67f0b09643159ff4bd684ee896db","complete":true,"records":13666,"lastAttemptAt":"2026-11-09T08:02:26.9587387+00:00","lastSuccessAt":"2026-11-09T07:04:26.209+00:00","error":null,"lastVerifiedAt":"2026-11-09T07:04:26.209+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-980593e6977a6d1b4fb1eed5a1ffe88a468736f89f0a06f710924ad59132c023","complete":true,"records":9914,"lastAttemptAt":"2026-11-09T08:02:26.1458433+00:00","lastSuccessAt":"2026-11-08T11:07:07.068788+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:02:26.1458433+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-09T08:02:25.8338551+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:02:25.8338551+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f6d341f4320a5a0c059c28102ee651c3dd06abc87b84d2bafa4e2a823ec07d35","complete":true,"records":3056,"lastAttemptAt":"2026-11-09T08:02:26.1741996+00:00","lastSuccessAt":"2026-11-09T05:02:23.1539412+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:02:26.1741996+00:00","snapshotPublishedAt":"2026-11-09T04:47:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-32fcf2a839d0d91a36b31c98096d6b8a1a8cc523d64745f8a939e306130e49f2","complete":true,"records":231296,"lastAttemptAt":"2026-11-09T08:02:25.9613255+00:00","lastSuccessAt":"2026-11-09T07:04:23.2641171+00:00","error":null,"lastVerifiedAt":"2026-11-09T08:02:25.9613255+00:00","snapshotPublishedAt":"2026-11-09T06:48:11+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}