Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. stb_image
  4. ›
  5. GHSA-ppjr-267j-5p9x

GHSA-ppjr-267j-5p9x: NULL pointer derefernce in `stb_image`

March 20, 2023 (updated July 19, 2023)

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.

References

  • github.com/advisories/GHSA-ppjr-267j-5p9x
  • github.com/servo/rust-stb-imag
  • github.com/servo/rust-stb-image/pull/102
  • rustsec.org/advisories/RUSTSEC-2023-0021.html

Code Behaviors & Features

Detect and mitigate GHSA-ppjr-267j-5p9x with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.2.5

Fixed versions

  • 0.2.5

Solution

Upgrade to version 0.2.5 or above.

Weakness

  • CWE-476: NULL Pointer Dereference

Source file

cargo/stb_image/GHSA-ppjr-267j-5p9x.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:25 +0000.