CVE-2023-45667 Null pointer dereference because of an uninitialized variable in stb_image

Medium 5.3 Published Updated

An attacker can cause a program crash by triggering a null pointer dereference in the stb_image library during GIF processing.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-45667?

CVE-2023-45667 is a medium-severity vulnerability in nothings stb, published on 20 Oct 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

stb_image is a single file MIT licensed library for processing images.

If `stbi__load_gif_main` in `stbi_load_gif_from_memory` fails it returns a null pointer and may keep the `z` variable uninitialized. In case the caller also sets the flip vertically flag, it continues and calls `stbi__vertical_flip_slices` with the null pointer result value and the uninitialized `z` value. This may result in a program crash.

Weakness: CWE-476

Which versions are affected by CVE-2023-45667?

It affects 1 product.

Products include Nothings Stb Image.h.

How do I fix CVE-2023-45667?

Apply the vendor's patch.

Is CVE-2023-45667 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-45667 exists.

Sources

Also known as DEBIAN-CVE-2023-45667, UBUNTU-CVE-2023-45667.

Is CVE-2023-45667 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free