GHSA-ppjr-267j-5p9x
MEDIUMNULL pointer derefernce in `stb_image`
A bug in error handling in the stb_image C library could cause a NULL pointer dereference when attempting to load an invalid or unsupported image file. This is fixed in version 0.2.5 and later of the stb_image Rust crate, by patching the C code to correctly handle NULL pointers.
- Published
- 19 Mar 2023
- Last modified
- 8 Nov 2023
- Weakness
- CWE-476
- Also known as
- RUSTSEC-2023-0021
- Sources
- OSVJSONOSV RUSTSEC-2023-0021JSON
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | stb_image | < 0.2.5 | 0.2.5 |
| OSV | crates.io | stb_image | >= 0.0.0-0, < 0.2.5 | 0.2.5 |
References
- https://github.com/servo/rust-stb-image/pull/102 · WEB
- https://github.com/servo/rust-stb-imag · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2023-0021.html · WEB, ADVISORY
- https://crates.io/crates/stb_image · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 19 Mar 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 20 Mar 2023)