Command Injection Vulnerability in OpenSSL c_rehash Script
Summary
CVE-2022-1292: The c_rehash script does not properly sanitise shell metacharacters to prevent command injection. Affects openssl across 2 version ranges.
< 0
>= 89cd17a031e022211684eb7eb41190cf1910f9fa, < 4d346a188c27bdf78aa76590c641e1217732ca4b
No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
OpenSSL is an open-source software library that provides cryptographic functions to secure communications over computer networks. It is widely used in various applications, including web servers, email servers, and VPNs. The c_rehash script is a utility provided by OpenSSL to create symbolic links for certificate files in a directory. It is used to generate the necessary files for OpenSSL to work with certificate authorities. However, the c_rehash script is vulnerable to command injection, which allows an attacker to execute arbitrary commands with the privileges of the script.
Vulnerability Detail
The c_rehash script does not properly sanitize shell metacharacters, making it susceptible to command injection attacks. An attacker can exploit this vulnerability by providing malicious input to the script, which is automatically executed on some operating systems. By injecting arbitrary commands, the attacker can gain unauthorized access, escalate privileges, or perform other malicious activities on the system. This vulnerability has a CVSS score of 9.8, indicating its severity.
How To Fix
To fix this vulnerability, it is recommended to replace the use of the c_rehash script with the OpenSSL rehash command line tool. The rehash tool is not affected by this vulnerability and provides a safer alternative. Users should update their OpenSSL installations to the fixed versions: OpenSSL 3.0.3, OpenSSL 1.1.1o, or OpenSSL 1.0.2ze, depending on the specific version they are using.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, users can mitigate the risk by following the recommended fix and replacing the c_rehash script with the OpenSSL rehash command line tool.
Conclusion
The command injection vulnerability in the OpenSSL c_rehash script poses a significant security risk to systems using affected versions of OpenSSL. It is crucial to update OpenSSL to the fixed versions and replace the vulnerable script with the recommended alternative. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for openssl →
FAQ
OpenSSL is an open-source software library that provides cryptographic functions to secure communications over computer networks.
The c_rehash script is a utility provided by OpenSSL to create symbolic links for certificate files in a directory.
Command injection is a vulnerability that allows an attacker to execute arbitrary commands on a system by injecting malicious input.
This vulnerability can lead to unauthorized access, privilege escalation, and other malicious activities on the affected system.
To fix this vulnerability, replace the c_rehash script with the OpenSSL rehash command line tool and update OpenSSL to the fixed versions.
References
Related vulnerabilities
Recent vulnerabilities recorded for openssl.