CVE-2023-24805: Command injection in cups-filters
A vulnerability was found in cups-filters. This security flaw occurs if you use beh to create an accessible network printer, possibly resulting in remote code execution.
Other sources
beh backend: Use execv() instead of system() - CVE-2023-24805
If you use "beh" to create an accessible network printer, this security vulnerability can cause remote code execution. https://github.com/OpenPrinting/cups-filters/security/advisories/GHSA-gpxc-v2m8-fr3x
— Red Hat
cups-filters contains backends, filters, and other software required to get the cups printing service working on operating systems other than macos. If you use the Backend Error Handler (beh) to create an accessible network printer, this security vulnerability can cause remote code execution. beh.c contains the line retval = system(cmdline) >> 8; which calls the system command with the operand cmdline. cmdline contains multiple user controlled, unsanitized values. As a result an attacker with network access to the hosted print server can exploit this vulnerability to inject system commands which are executed in the context of the running server. This issue has been addressed in commit 8f2740357 and is expected to be bundled in the next release. Users are advised to upgrade when possible and to restrict access to network printers in the meantime.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.20.0-29.el8_8.2 - Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.20.0-18.el8_1.1 - Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.20.0-19.el8_2.1 - Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.20.0-24.el8_4.1 - Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.20.0-27.el8_6.1 - Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.28.7-11.el9_2.1 - Upgrade
Upgrade
redhat/cups-filtersto a version that resolves this vulnerability.Fixed in 0:1.28.7-10.el9_0.1 - Upgrade
Upgrade
debian/cups-filtersto a version that resolves this vulnerability.Fixed in 1.21.6-5+deb10u1Fixed in 1.28.7-1+deb11u2Fixed in 1.28.17-3 - Upgrade
Upgrade
debian/cups-filtersto a version that resolves this vulnerability.Fixed in 1.28.17-3Fixed in 1.28.7-1+deb11u2 - Upgrade
Upgrade
alpine/cups-filtersto a version that resolves this vulnerability.Fixed in 1.28.17-r2 - Upgrade
Upgrade
alpine/cups-filtersto a version that resolves this vulnerability.Fixed in 1.28.17-r3 - Upgrade
Upgrade
cups-filtersto a version that resolves this vulnerability.Patch 8f2740357 - Compensating control
Restrict access to network printers, particularly printers created with the Backend Error Handler (beh), until the fix is applied.
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2023-24805?
CVE-2023-24805 is a vulnerability found in cups-filters that can lead to remote code execution if the Backend Error Handler (beh) is used to create an accessible network printer.
How does the vulnerability in cups-filters occur?
The vulnerability in cups-filters occurs when the Backend Error Handler (beh) is used to create an accessible network printer.
What is the severity of CVE-2023-24805?
CVE-2023-24805 has a severity rating of 8.8, indicating a high severity.
What software versions are affected by CVE-2023-24805?
The affected software versions include cups-filters 1.20.0-29.el8_8.2, 1.20.0-18.el8_1, 1.20.0-19.el8_2, 1.20.0-24.el8_4, 1.20.0-27.el8_6, 1.28.7-11.el9_2.1, and 1.28.7-10.el9_0.1.
How can I mitigate or fix the vulnerability in cups-filters?
To mitigate the vulnerability in cups-filters, it is recommended to update to the latest version of the software, such as cups-filters 1.21.6-5+deb10u1, 1.28.7-1+deb11u2, or 1.28.17-3, depending on your distribution.