[GHSA-mrrw-grhq-86gf] Ascii (crate) allows out-of-bounds array indexing in safe code#8015
Merged
advisory-database[bot] merged 1 commit intoJul 16, 2026
Conversation
Copilot stopped work on behalf of
RainSignal due to an error
June 11, 2026 18:21
github-actions
Bot
changed the base branch from
main
to
RainSignal/advisory-improvement-8015
June 11, 2026 18:22
|
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
advisory-database
Bot
merged commit Jul 16, 2026
2f662fa
into
RainSignal/advisory-improvement-8015
4 checks passed
Contributor
|
Hi @RainSignal! Thank you so much for contributing to the GitHub Advisory Database. This database is free, open, and accessible to all, and it's people like you who make it great. Thanks for choosing to help others. We hope you send in more contributions in the future! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
Comments
The advisory states affected versions start from 0.6.0, but code
review shows this is incorrect.
Version 0.6.0 was verified to NOT contain the vulnerable code:
https://github.com/tomprogrammer/rust-ascii/blob/0.6.0/src/lib.rs
The file only contains immutable AsRef trait implementations, with
no impl_into! macro and no mutable From implementations.
Version 0.7.0 was verified to contain the vulnerable code:
https://github.com/tomprogrammer/rust-ascii/blob/v0.7.0/src/ascii_str.rs
The impl_into! macro in 0.7.0 generates both of the unsound
implementations:
Therefore the affected version range should start from 0.7.0,
not 0.6.0.
The current advisory has no CWE assigned. The correct weakness is
CWE-119 (Improper Restriction of Operations within the Bounds of a
Memory Buffer), as the unsound mutable From implementations allow
writing non-ASCII bytes into an AsciiStr, which when later read as
AsciiChar produces values outside the valid niche, causing
out-of-bounds array indexing in safe code.