CVEfocus › CVE database › CVE-2022-2068

CVE-2022-2068The c_rehash script allows command injection

CVSS 9.8 CriticalEPSS 9.3% (higher than 96% of CVEs)Published 2022-06-21Updated 2026-11-04Assigner: openssl

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).

CWE-78

What to do

Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

25Fixed
4Fix pending
16Will not fix
26Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04edk2Not affected
vulnerable_code_not_present
Ubuntu 26.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 26.04opensslNot affected
vulnerable_code_not_present
Ubuntu 25.10edk2Not affected
vulnerable_code_not_present
Ubuntu 25.10nodejsNot affected
vulnerable_code_not_present
Ubuntu 25.10opensslNot affected
vulnerable_code_not_present
Ubuntu 24.04edk2Not affected
vulnerable_code_not_present
Ubuntu 24.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04opensslNot affected
vulnerable_code_not_present
Ubuntu 22.04edk2Not affected
vulnerable_code_not_present
Ubuntu 22.04nodejsFixed12.22.9~dfsg-1ubuntu3.1UBUNTU-CVE-2022-2068
Ubuntu 22.04opensslFixed3.0.2-0ubuntu1.5UBUNTU-CVE-2022-2068
Ubuntu 20.04opensslFixed1.1.1f-1ubuntu2.15UBUNTU-CVE-2022-2068
Ubuntu 18.04opensslFixed1.1.1-1ubuntu2.1~18.04.19UBUNTU-CVE-2022-2068
Ubuntu 18.04openssl1.0Fixed1.0.2n-1ubuntu5.10UBUNTU-CVE-2022-2068
Ubuntu 16.04edk2Fix pendingUBUNTU-CVE-2022-2068
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 16.04opensslFix pending1.0.2g-1ubuntu4.20+esm5 (Ubuntu Pro)UBUNTU-CVE-2022-2068
Ubuntu 14.04edk2Fix pending
Ubuntu 14.04opensslFix pending1.0.1f-1ubuntu2.27+esm10 (Ubuntu Pro)UBUNTU-CVE-2022-2068
Debian 14opensslFixed3.0.4-1DEBIAN-CVE-2022-2068
Debian 13opensslFixed3.0.4-1DEBIAN-CVE-2022-2068
Debian 12opensslFixed3.0.4-1DEBIAN-CVE-2022-2068
Red Hat Enterprise Linux 9compat-openssl11Will not fix
Out of support scope
Red Hat Enterprise Linux 9edk2Not affected
Red Hat Enterprise Linux 9edk2-aarch64Not affected
Red Hat Enterprise Linux 9edk2-ovmfNot affected
Red Hat Enterprise Linux 9edk2-toolsNot affected
Red Hat Enterprise Linux 9edk2-tools-docNot affected
Red Hat Enterprise Linux 9opensslFixed1:3.0.1-41.el9_0RHSA-2022:6224
Red Hat Enterprise Linux 9openssl-develFixed1:3.0.1-41.el9_0RHSA-2022:6224
Red Hat Enterprise Linux 9openssl-libsFixed1:3.0.1-41.el9_0RHSA-2022:6224
Red Hat Enterprise Linux 9openssl-perlFixed1:3.0.1-41.el9_0RHSA-2022:6224
Red Hat Enterprise Linux 9shimNot affected
Red Hat Enterprise Linux 9shim-aa64Not affected
Red Hat Enterprise Linux 9shim-x64Not affected
Red Hat Enterprise Linux 8compat-openssl10Will not fix
Out of support scope
Red Hat Enterprise Linux 8edk2Not affected
Red Hat Enterprise Linux 8edk2-aarch64Not affected
Red Hat Enterprise Linux 8edk2-ovmfNot affected
Red Hat Enterprise Linux 8opensslFixed1:1.1.1k-7.el8_6RHSA-2022:5818
Red Hat Enterprise Linux 8openssl-develFixed1:1.1.1k-7.el8_6RHSA-2022:5818
Red Hat Enterprise Linux 8openssl-libsFixed1:1.1.1k-7.el8_6RHSA-2022:5818
Red Hat Enterprise Linux 8openssl-perlFixed1:1.1.1k-7.el8_6RHSA-2022:5818
Red Hat Enterprise Linux 8shimNot affected
Red Hat Enterprise Linux 8shim-aa64Not affected
Red Hat Enterprise Linux 8shim-ia32Not affected
Red Hat Enterprise Linux 8shim-x64Not affected
Red Hat Enterprise Linux 7AAVMFWill not fix
Out of support scope
Red Hat Enterprise Linux 7OVMFWill not fix
Out of support scope
Red Hat Enterprise Linux 7opensslWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-staticWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl098eWill not fix
Out of support scope
Red Hat Enterprise Linux 7ovmfWill not fix
Out of support scope
Red Hat Enterprise Linux 6opensslWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-staticWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl098eWill not fix
Out of support scope
AlmaLinux 9opensslFixed1:3.0.1-41.el9_0ALSA-2022:6224
AlmaLinux 9openssl-develFixed1:3.0.1-41.el9_0ALSA-2022:6224
AlmaLinux 9openssl-libsFixed1:3.0.1-41.el9_0ALSA-2022:6224
AlmaLinux 9openssl-perlFixed1:3.0.1-41.el9_0ALSA-2022:6224
AlmaLinux 8opensslFixed1:1.1.1k-7.el8_6ALSA-2022:5818
AlmaLinux 8openssl-develFixed1:1.1.1k-7.el8_6ALSA-2022:5818
AlmaLinux 8openssl-libsFixed1:1.1.1k-7.el8_6ALSA-2022:5818
AlmaLinux 8openssl-perlFixed1:1.1.1k-7.el8_6ALSA-2022:5818
Rocky Linux 8opensslFixed1:1.1.1k-7.el8_6RLSA-2022:5818

What the vendor says

As published in the CVE record by openssl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.