GHSA-2226-4v3c-cff8

Source
https://github.com/advisories/GHSA-2226-4v3c-cff8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-2226-4v3c-cff8/GHSA-2226-4v3c-cff8.json
Aliases
Published
2022-06-17T00:18:24Z
Modified
2023-11-08T04:13:48.926151Z
Details

When parsing JSON using json::Json::from_str, there is no limit to the depth of the stack, therefore deeply nested objects can cause a stack overflow, which aborts the process.

Example code that triggers the vulnerability is

fn main() {
    let _ = rustc_serialize::json::Json::from_str(&"[0,[".repeat(10000));
}

serde is recommended as a replacement to rustc_serialize.

References

Affected packages

crates.io / rustc-serialize

Package

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Last affected
0.3.24