CVE-2022-35166
NixOS vulnerability analysis and mitigation

Overview

libjpeg commit 842c7ba was discovered to contain an infinite loop vulnerability in the component JPEG::ReadInternal. The vulnerability was discovered and reported on June 26, 2022, and was assigned CVE-2022-35166. This vulnerability affects the libjpeg library, which is a widely used image processing software (MITRE CVE, Ubuntu Security).

Technical details

The vulnerability occurs in the JPEG::ReadInternal function when processing certain JPEG files. Specifically, when a marker equals 0xffd9, ParseFrameHeader returns NULL, which initializes mpCurrent with NULL. Due to mbReceivedFrameHeader being set to true afterward, subsequent calls to StartParseFrame continue returning m_pCurrent=NULL, resulting in an infinite loop in JPEG::ReadInternal. The vulnerability has been assigned a CVSS 3.1 score of 5.5 (Medium), with the vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H (GitHub Issue, Ubuntu Security).

Impact

The vulnerability primarily affects system availability through a denial of service condition caused by the infinite loop. When exploited, it can cause the application to hang, consuming system resources. The CVSS scoring indicates high impact on availability while having no direct impact on confidentiality or integrity (Ubuntu Security).

Mitigation and workarounds

The vulnerability affects multiple versions of libjpeg, including those in Debian distributions such as bullseye, bookworm, and sid/trixie. As of the latest reports, the vulnerability remains unfixed in some distributions, though it has been noted as having unimportant urgency due to it being primarily a hang in the CLI tool without significant security impact (Debian Security).

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-esr
NoYesDec 09, 2025
CVE-2025-14332HIGH7.3
  • NixOSNixOS
  • thunderbird
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