CVE-2022-48624
less: missing quoting of shell metacharacters in LESSCLOSE handling
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · February 19, 2024
Updated · November 21, 2025
Description
A flaw was found in less. The close_altfile() function in filename.c omits shell_quote calls for LESSCLOSE, a command line to invoke the optional input postprocessor. This issue could lead to an OS command injection vulnerability and arbitrary command execution on the host operating system.
Statement
To exploit this issue, an attacker needs the ability to influence the LESSCLOSE environment variable. This requirement makes this CVE a Moderate impact CVE.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')