# CVE-2022-2068: The c_rehash script allows command injection

> Attackers can execute arbitrary commands via the c_rehash script due to improper sanitization of shell metacharacters in certificate filenames.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Jun 2022
- **Updated:** 14 Oct 2026
- **Also known as:** AZL-9967, DEBIAN-CVE-2022-2068, DSA-5169-1, GHSA-xjxr-x4h8-946x, JLSEC-2026-229, MGASA-2022-0246, OESA-2022-1737, SUSE-SU-2022:2179-1, SUSE-SU-2022:2180-1, SUSE-SU-2022:2181-1, UBUNTU-CVE-2022-2068, USN-5488-1, USN-5488-2, openSUSE-SU-2024:12159-1

## What is CVE-2022-2068?

CVE-2022-2068 is a critical command injection vulnerability in Debian Debian Linux, published on 21 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2022-2068?

It affects 28 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openssl-1_1` | SUSE:Enterprise Storage 6 | All versions | 1.1.0i-150100.14.33.1 |
| `openssl` | SUSE:HPE Helion OpenStack 8 | All versions | 1.0.2j-60.83.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 1.1.0i-150100.14.33.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.1.0i-150100.14.33.1 |
| `openssl` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 1.0.2j-60.83.1 |
| `openssl` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 1.0.2j-60.83.1 |
| `openssl` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 1.0.2j-60.83.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 1.0.2p-3.56.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.0.2p-3.56.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 1.1.0i-150100.14.33.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.1.0i-150100.14.33.1 |
| `openssl` | SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 1.0.2j-60.83.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 1.0.2p-3.56.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.0.2p-3.56.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.1.0i-150100.14.33.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 1.0.2p-3.56.1 |
| `openssl` | SUSE:OpenStack Cloud 8 | All versions | 1.0.2j-60.83.1 |
| `openssl-1_0_0` | SUSE:OpenStack Cloud 9 | All versions | 1.0.2p-3.56.1 |
| `openssl` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 1.0.2j-60.83.1 |
| `openssl-1_0_0` | SUSE:OpenStack Cloud Crowbar 9 | All versions | 1.0.2p-3.56.1 |
| `openssl-1_1` | openSUSE:Tumbleweed | All versions | 1.1.1p-1.1 |

Products: Broadcom Sannav, Debian Debian Linux, Fedoraproject Fedora, Netapp Aff 8300 Firmware, Netapp Aff 8700 Firmware, Netapp Aff A400 Firmware, Netapp Bootstrap Os, Netapp Element Software, Netapp Fas 8300 Firmware, Netapp Fas 8700 Firmware, Netapp Fas A400 Firmware, Netapp H300s Firmware, Netapp H410c Firmware, Netapp H410s Firmware, Netapp H500s Firmware, Netapp H610c Firmware, Netapp H610s Firmware, Netapp H615c Firmware, Netapp H700s Firmware, Netapp Hci Management Node and 8 more.

## How do I fix CVE-2022-2068?

Upgrade to a fixed version.

## Is CVE-2022-2068 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-2068 exists.

## Other vulnerabilities in Debian Debian Linux

- [CVE-2022-28163](https://insights.sbomify.com/CVE-2022-28163/): SQL injection in Brocade SANNav (critical 9.8)
- [CVE-2020-15377](https://insights.sbomify.com/CVE-2020-15377/): Server-side request forgery in Brocade SANnav (critical 9.8)
- [CVE-2022-28165](https://insights.sbomify.com/CVE-2022-28165/): Missing authorization in Brocade SANNav (high 8.8)
- [CVE-2025-12772](https://insights.sbomify.com/CVE-2025-12772/): Plaintext Switch admin login password is seen in Brocade SANnav support save (high 8.5)
- [CVE-2022-28166](https://insights.sbomify.com/CVE-2022-28166/): Weak cryptography in Brocade SANnav (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-2068 and fix it if it is affected.

What it is: CVE-2022-2068 is a critical command injection vulnerability in Debian Debian Linux, published on 21 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-2068 exists.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-2068/ (Markdown: https://insights.sbomify.com/CVE-2022-2068/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-2068
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-2068
- OSV: https://osv.dev/vulnerability/CVE-2022-2068

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-2068/
Summaries are generated and may contain mistakes; the official description above is the record.
