CVE-2022-31796
NixOS vulnerability analysis and mitigation

Overview

libjpeg 1.63 contains a heap-based buffer over-read vulnerability (CVE-2022-31796) in the HierarchicalBitmapRequester::FetchRegion function within hierarchicalbitmaprequester.cpp. The vulnerability occurs because the MCU (Minimum Coded Unit) size can be different between allocation and use (Debian Security).

Technical details

The vulnerability exists in the HierarchicalBitmapRequester::FetchRegion function where inconsistent MCU sizes across hierarchical levels can lead to a heap buffer overflow. The issue manifests when processing JPEG images where the MCU size differs between allocation and actual usage. This was confirmed through testing with Address Sanitizer which revealed a heap-buffer-overflow during memory operations (GitHub Issue).

Impact

When exploited, this vulnerability can lead to a heap buffer overflow condition, potentially resulting in program crashes or denial of service. The vulnerability affects systems running libjpeg version 1.63 (CVE Mitre).

Mitigation and workarounds

The issue has been fixed in newer versions of libjpeg. The fix includes adding checks for consistency of MCU sizes across hierarchical levels, causing the program to fail if they differ. The patch was implemented in commit 187035b (GitHub Commit).

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-2025-14330CRITICAL9.8
  • NixOSNixOS
  • cpe:2.3:a:mozilla:firefox_esr
NoYesDec 09, 2025
CVE-2025-14329HIGH8.8
  • NixOSNixOS
  • cpe:2.3:a:mozilla:firefox:*:*:*:*:esr:*:*:*
NoYesDec 09, 2025
CVE-2025-14333HIGH8.1
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025
CVE-2025-14332HIGH7.3
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025
CVE-2025-14331MEDIUM6.5
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025

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