CVE-2022-4883
NixOS vulnerability analysis and mitigation

Overview

A security vulnerability (CVE-2022-4883) was discovered in libXpm, a library handling X PixMap image format. The vulnerability was disclosed on January 17, 2023. The flaw affects the library's handling of files with .Z or .gz extensions, where it calls external programs to compress and uncompress files using the PATH environment variable to locate these programs (X.Org Advisory).

Technical details

When processing files with .Z or .gz extensions, libXpm versions 3.5.14 and earlier use execlp() to execute compression and decompression commands, relying on the PATH environment variable to locate these programs. This implementation creates a security risk when the library is used by programs running with elevated privileges, such as setuid programs. The vulnerability has been assigned a CVSS 3.1 base score of 8.8 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (Ubuntu Security).

Impact

If exploited, this vulnerability could allow a malicious user to execute arbitrary programs with elevated privileges by manipulating the PATH environment variable. This is particularly concerning when libXpm is called from a program running with raised privileges, such as via setuid, as the attacker-controlled programs would inherit these elevated permissions (X.Org Advisory).

Mitigation and workarounds

The vulnerability has been fixed in libXpm version 3.5.15. The fix includes changes to how external compression commands are handled and introduces a new configure option --disable-open-zfile that allows completely disabling the code to fork compression and uncompression programs. System administrators are advised to update to the patched version. Additionally, X.Org security team recommends separating code that requires privileges from the GUI to reduce the risk of such vulnerabilities (X.Org Advisory).

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-12819HIGH8.1
  • NixOSNixOS
  • pgbouncer
NoYesDec 03, 2025
CVE-2025-20777MEDIUM6.7
  • NixOSNixOS
  • android
NoNoDec 02, 2025
CVE-2025-65105MEDIUM5.3
  • NixOSNixOS
  • apptainer
NoYesDec 02, 2025
CVE-2025-20789MEDIUM4.4
  • NixOSNixOS
  • android
NoNoDec 02, 2025
CVE-2025-20788MEDIUM4.4
  • NixOSNixOS
  • android
NoNoDec 02, 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