OS Command Injection in jhead - CVE-2022-41751
Published: December 5, 2022 / Updated: June 8, 2023
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.
The vulnerability exists due to improper input validation when processing filenames of JPEG images. A remote unauthenticated attacker can pass specially crafted filename to the application and execute arbitrary OS commands on the target system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
Debian Linux
Fedora
Ubuntu
jhead (Ubuntu package)
jhead (Debian package)
jhead
How to mitigate CVE-2022-41751
jhead (Debian package) - update to 1:3.04-6+deb11u1
jhead - addressed in versions 3.06.0.1-5.el7, 3.06.0.1-5.el8, 3.06.0.1-5.el9, 3.06.0.1-5.fc35, 3.06.0.1-5.fc36, 3.06.0.1-5.fc37
External References
- https://github.com/Matthias-Wandel/jhead/blob/63ce118c6a59ea64ac357236a11a47aaf569d622/jhead.c#L788
- https://github.com/Matthias-Wandel/jhead/pull/57
- https://github.com/Matthias-Wandel/jhead
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TAVB3ZX7E5ULEXESU5NXZIAHY6CVGCHB/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EG26AD7KJAY5B6L6OERSGL4FRXJE3GOB/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5NM6FET4ZNWV4EQGKZTLZFWTNVODGVOK/
- https://lists.debian.org/debian-lts-announce/2022/12/msg00004.html