CVE-2022-1292: The c_rehash script allows command injection
A flaw was found in OpenSSL. The crehash script does not properly sanitize shell meta-characters to prevent command injection. Some operating systems distribute this script in a manner where it is automatically executed. This flaw allows an attacker to execute arbitrary commands with the privileges of the script on these operating systems.
Other sources
The crehash script does not properly sanitise shell metacharacters to prevent command injection. This script is distributed by some operating systems in a manner where it is automatically executed. On such operating systems, an attacker could execute arbitrary commands with the privileges of the script.
Use of the crehash script is considered obsolete and should be replaced by the OpenSSL rehash command line tool.
This issue affects OpenSSL versions 1.0.2, 1.1.1 and 3.0.
OpenSSL 1.0.2 users should upgrade to 1.0.2ze OpenSSL 1.1.1 users should upgrade to 1.1.1o OpenSSL 3.0 users should upgrade to 3.0.3
— Red Hat
The crehash script does not properly sanitise shell metacharacters to prevent command injection. This script is distributed by some operating systems in a manner where it is automatically executed. On such operating systems, an attacker could execute arbitrary commands with the privileges of the script. Use of the crehash script is considered obsolete and should be replaced by the OpenSSL rehash command line tool. Fixed in OpenSSL 3.0.3 (Affected 3.0.0,3.0.1,3.0.2). Fixed in OpenSSL 1.1.1o (Affected 1.1.1-1.1.1n). Fixed in OpenSSL 1.0.2ze (Affected 1.0.2-1.0.2zd).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/jbcs-httpd24-opensslto a version that resolves this vulnerability.Fixed in 1:1.1.1k-13.el8 - Upgrade
Upgrade
redhat/jbcs-httpd24-opensslto a version that resolves this vulnerability.Fixed in 1:1.1.1k-13.el7 - Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 1:1.1.1k-7.el8_6 - Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 1:3.0.1-41.el9_0 - Upgrade
Upgrade
redhat/jws5-tomcat-nativeto a version that resolves this vulnerability.Fixed in 0:1.2.31-11.redhat_11.el7 - Upgrade
Upgrade
redhat/jws5-tomcat-nativeto a version that resolves this vulnerability.Fixed in 0:1.2.31-11.redhat_11.el8 - Upgrade
Upgrade
redhat/jws5-tomcat-nativeto a version that resolves this vulnerability.Fixed in 0:1.2.31-11.redhat_11.el9 - Upgrade
Upgrade
debian/opensslto a version that resolves this vulnerability.Fixed in 1.1.1w-0+deb11u1Fixed in 1.1.1w-0+deb11u2Fixed in 3.0.15-1~deb12u1Fixed in 3.0.14-1~deb12u2Fixed in 3.5.0-1 - Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 1.0.2 - Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 1.1.1 - Upgrade
Upgrade
redhat/opensslto a version that resolves this vulnerability.Fixed in 3.0.3 - Upgrade
Upgrade
OpenSSL 1.0.2to a version that resolves this vulnerability.Fixed in 1.0.2ze - Upgrade
Upgrade
OpenSSL 1.1.1to a version that resolves this vulnerability.Fixed in 1.1.1o - Upgrade
Upgrade
OpenSSL 3.0to a version that resolves this vulnerability.Fixed in 3.0.3 - Configuration
Stop using the obsolete c_rehash script and replace it with the OpenSSL rehash command line tool (e.g., where supported by your OpenSSL packaging).
OpenSSL c_rehash script use_of_c_rehash = replace_with_openssl_rehash_command_line_tool
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2022-1292?
CVE-2022-1292 has been classified as a critical severity vulnerability.
How do I fix CVE-2022-1292?
To fix CVE-2022-1292, upgrade to a patched version of the affected software as listed in the remediation section.
What versions of OpenSSL are affected by CVE-2022-1292?
CVE-2022-1292 affects OpenSSL versions prior to 1.1.1k-13.el8, 1.1.1k-13.el7, and certain earlier versions of 1.1.1.
Is there a workaround for CVE-2022-1292?
There is no effective workaround for CVE-2022-1292; applying the required updates is the only solution.
What types of attacks does CVE-2022-1292 expose to?
CVE-2022-1292 exposes systems to command injection attacks allowing attackers to execute arbitrary commands.