Vulnerability record · CVE-2022-1292 · published 3 May 2022
CVE-2022-1292: OpenSSL c_rehash script command injection via unsanitised shell metacharacters
Siemens · Brownfield Connectivity Gateway
The c_rehash script shipped with OpenSSL fails to sanitise shell metacharacters, allowing command injection. On operating systems that execute the script automatically, an attacker can run arbitrary commands with the privileges of that script. The script is obsolete and should be replaced by the OpenSSL rehash command line tool.
Description
The c_rehash 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 c_rehash 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).
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Automated analysis
high priorityHigh CVSS (7.3) command injection with very high EPSS, though exploitation requires local access and user interaction and it is not in KEV.
What it is
The c_rehash script shipped with OpenSSL fails to sanitise shell metacharacters, allowing command injection. On operating systems that execute the script automatically, an attacker can run arbitrary commands with the privileges of that script. The script is obsolete and should be replaced by the OpenSSL rehash command line tool.
Impact
An attacker gains arbitrary command execution at the privilege level of the c_rehash script, which on some systems is elevated or automated. This can lead to full compromise of the host or the OpenSSL-using service context.
Attack surface
Reached locally per the CVSS vector (AV:L) with low privileges required (PR:L) and user interaction needed (UI:R), typically by placing crafted files or paths that the script processes. No network vector is indicated.
Exploitation
Not listed in CISA KEV and no ransomware usage documented, but EPSS is very high at 0.826 (99.6th percentile), indicating substantial observed or expected exploitation activity. References are advisory and patch commits, with no public exploit tag supplied.
What to do
- Patch OpenSSL to 3.0.3, 1.1.1o, or 1.0.2ze as applicable to the deployed branch.
- Stop using the c_rehash script and switch to the OpenSSL rehash command line tool.
- Remove or restrict execution of c_rehash on systems where it is invoked automatically.
- Audit OS packages and third-party products that bundle OpenSSL for the affected script and update them.
- Restrict local write access to directories processed by c_rehash to trusted users only.
Detection
- Monitor process execution for c_rehash invocations, especially from automated or privileged contexts.
- Alert on shell metacharacters (;, |, $(), backticks) appearing in arguments or filenames passed to c_rehash.
- Hunt for unexpected child processes spawned by c_rehash or by services that call it.
- Review file creation in certificate directories for names containing shell metacharacters.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
35 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2022-1292 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2022-1292), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.