Cyber Resilience

CVE-2023-45664

Memory Safety in Nothings Stb Image.H 2.28

Published
21 October 2023
Modified
21 November 2024
CVSS Score v3.1 7.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
EPSS Score 0.0087 55th percentile
Risk Priority 58 floored blend · peak EPSS

Summary

CVE-2023-45664 is a high-severity Double Free (CWE-415) vulnerability in Nothings Stb Image.H. Its CVSS base score is 7.3 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Client Execution (T1203); ranked in the top 45% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

EU & UK References

Vulnerability Data

stb_image is a single file MIT licensed library for processing images. A crafted image file can trigger `stbi__load_gif_main_outofmem` attempt to double-free the out variable. This happens in `stbi__load_gif_main` because when the `layers * stride` value is zero the behavior is…

more

implementation defined, but common that realloc frees the old memory and returns null pointer. Since it attempts to double-free the memory a few lines below the first “free”, the issue can be potentially exploited only in a multi-threaded environment. In the worst case this may lead to code execution.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-43281Same product: Nothings Stb Image.H
CVE-2023-45666Same product: Nothings Stb Image.H
CVE-2023-45661Same product: Nothings Stb Image.H
CVE-2023-45662Same product: Nothings Stb Image.H
CVE-2025-3409Same product: Nothings Stb Image.H
CVE-2025-3406Same product: Nothings Stb Image.H
CVE-2025-3408Same product: Nothings Stb Image.H
CVE-2025-3407Same product: Nothings Stb Image.H
CVE-2023-43898Same product: Nothings Stb Image.H
CVE-2023-45663Same product: Nothings Stb Image.H

Affected Assets

nothings
stb image.h
2.28

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 1 hardening rule · 1 OS baseline
Validate
Prove the fix (OWASP ASVS)

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 full match
prevents

Secure SDLC practices directly prevent double-free errors via static analysis, safe memory APIs, and testing.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development can detect double-free conditions before release.

prevents

Secure development life cycle includes memory-safety practices that can prevent double-free bugs.

prevents

Application security requirements can mandate memory-safety rules that reduce double-free risk.

prevents

Secure system architecture and engineering principles can prescribe safe memory-management patterns.

prevents

Secure coding standards directly address proper use of free() and similar functions.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (1 rule)
  • V-248590 OL 8 must clear the page allocator to prevent use-after-free attacks. prevents CWE-415

References