Skip to content
  • Alan Coopersmith's avatar
    Fix CVE-2022-4883: compression commands depend on $PATH · 515294bb
    Alan Coopersmith authored
    
    
    By default, on all platforms except MinGW, libXpm will detect if a
    filename ends in .Z or .gz, and will when reading such a file fork off
    an uncompress or gunzip command to read from via a pipe, and when
    writing such a file will fork off a compress or gzip command to write
    to via a pipe.
    
    In libXpm 3.5.14 or older these are run via execlp(), relying on $PATH
    to find the commands.  If libXpm is called from a program running with
    raised privileges, such as via setuid, then a malicious user could set
    $PATH to include programs of their choosing to be run with those
    privileges.
    
    Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    515294bb