CVE-2022-2068
The c_rehash script allows command injection
Check your servers for CVE-2022-2068
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-2068 affects openssl, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In addition to the c_rehash shell command injection identified in CVE-2022-1292, further circumstances where the c_rehash script does not properly sanitise shell metacharacters to prevent command injection were found by code review. When the CVE-2022-1292 was fixed it was not discovered that there are other places in the script where the file names of certificates being hashed were possibly passed to a command executed through the shell. 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.4 (Affected 3.0.0,3.0.1,3.0.2,3.0.3). Fixed in OpenSSL 1.1.1p (Affected 1.1.1-1.1.1o). Fixed in OpenSSL 1.0.2zf (Affected 1.0.2-1.0.2ze).
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 96.3%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 99.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 30 Dec 2025):
- Exploitation
- poc: a proof of concept is public
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| OpenSSL |
affected Fixed in OpenSSL 3.0.4 (Affected 3.0.0,3.0.1,3.0.2,3.0.3) affected Fixed in OpenSSL 1.1.1p (Affected 1.1.1-1.1.1o) affected Fixed in OpenSSL 1.0.2zf (Affected 1.0.2-1.0.2ze)
|
Is my server affected?
Find the installed version of openssl and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i openssl
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2022-2068 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2022-2068RHEL, Rocky, Alma, Fedora
rpm -q openssl
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2022-2068Alpine
apk list --installed | grep -i opensslWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-2068
trivy image --scanners vuln IMAGE | grep CVE-2022-2068
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- DSA-5169 debian.org · vendor advisory
- FEDORA-2022-3b7d0abd0b lists.fedoraproject.org · vendor advisory
- FEDORA-2022-41890e9e44 lists.fedoraproject.org · vendor advisory
Other references
- https://www.openssl.org/news/secadv/20220621.txt openssl.org
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=2c9c35870601b4a44d86ddbf512b38df38285cfa git.openssl.org
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=9639817dac8bbbaa64d09efad7464ccc405527c7 git.openssl.org
- https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=7a9c027159fe9e1bbc2cd38a8a2914bff0d5abd9 git.openssl.org
- https://security.netapp.com/advisory/ntap-20220707-0008/ security.netapp.com
- https://cert-portal.siemens.com/productcert/pdf/ssa-332410.pdf cert-portal.siemens.com
- https://gitlab.com/fraf0/cve-2022-1292-re_score-analysis gitlab.com
- http://seclists.org/fulldisclosure/2024/Nov/0 seclists.org
- https://cert-portal.siemens.com/productcert/html/ssa-332410.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-794697.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-146325.html cert-portal.siemens.com
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html cert-portal.siemens.com
Source: the record CVE-2022-2068 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse