CVE-2021-37789
NixOS vulnerability analysis and mitigation

Overview

A heap-based buffer overflow vulnerability was discovered in stb_image.h version 2.27, specifically in the stbi__jpeg_load function. This vulnerability was assigned CVE-2021-37789 and could lead to Information Disclosure or Denial of Service (CVE Details).

Technical details

The vulnerability occurs in the stbi__jpeg_load function where, under specific conditions with special h and v values, there is a mismatch between w_lores and z->img_comp[k].w2 calculations. This mismatch leads to a heap-based buffer overflow when r->resample is called to copy w_lores size data. The issue was discovered using AddressSanitizer, which detected the overflow during memory access (GitHub Issue).

Impact

The exploitation of this vulnerability can result in Information Disclosure or Denial of Service conditions. The heap-based buffer overflow could potentially allow attackers to read sensitive information from memory or crash the application (Debian Security).

Exploitability

A proof of concept (PoC) demonstrating the vulnerability has been publicly disclosed. The issue can be triggered by processing specially crafted JPEG files that exploit the buffer overflow condition in the image processing function (GitHub Issue).

Mitigation and workarounds

The vulnerability has been addressed in newer versions of the software. Debian has released security updates to address this issue in various distributions, including version 0.0~git20180212.15.e6afb9c-1+deb10u1 for Debian 10 buster (Debian LTS).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-75874CRITICAL10
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74990CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-74989CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-74988CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-74987CRITICAL9.8
  • NixOS logoNixOS
  • MozillaFirefox
NoYesAug 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management