Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUSTSEC-2022-0004: Stack overflow in rustc_serialize when parsing deeply nested JSON #12

Open
github-actions bot opened this issue Sep 12, 2023 · 0 comments
Labels
A-dependencies Area: Pull requests that update a dependency file

Comments

@github-actions
Copy link

Stack overflow in rustc_serialize when parsing deeply nested JSON

Details
Package rustc-serialize
Version 0.3.24
Date 2022-01-01

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.

See advisory page for additional details.

@simonsan simonsan added the A-dependencies Area: Pull requests that update a dependency file label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant