# CVE-2022-3715: Memory corruption in bash

> A heap-buffer overflow in Bash parameter transformation allows attackers to cause memory corruption, potentially leading to code execution or denial of service.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jan 2023
- **Updated:** 14 Oct 2026
- **Also known as:** ALSA-2023:0340, DEBIAN-CVE-2022-3715, GHSA-cr4j-fv7c-759c, OESA-2022-2100, RHSA-2023:0340, RLSA-2023:0340, ROOT-OS-DEBIAN-11-CVE-2022-3715, UBUNTU-CVE-2022-3715, USN-6697-1

## What is CVE-2022-3715?

CVE-2022-3715 is a high-severity memory corruption vulnerability in Redhat Enterprise Linux, published on 5 Jan 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A flaw was found in the bash package, where a heap-buffer overflow can occur in valid parameter_transform. This issue may lead to memory problems.

Weakness: CWE-787 (Out-of-bounds Write), CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

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

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bash` | AlmaLinux:9 | All versions | 5.1.8-6.el9_1 |
| `bash-devel` | AlmaLinux:9 | All versions | 5.1.8-6.el9_1 |
| `bash` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.1.8-6.el9_1 |
| `bash-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.1.8-6.el9_1 |
| `bash-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:5.1.8-6.el9_1 |
| `bash-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.1.8-6.el9_1 |
| `bash-debugsource` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.1.8-6.el9_1 |
| `bash-devel` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.1.8-6.el9_1 |
| `bash` | Rocky Linux:9 | All versions | 0:5.1.8-6.el9_1 |

Products: Gnu Bash, Redhat Enterprise Linux.

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

Apply the vendor's patch.

## Is CVE-2022-3715 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2014-6278](https://insights.sbomify.com/CVE-2014-6278/): GNU Bash OS Command Injection (high 8.8, exploited in the wild)
- [CVE-2014-7186](https://insights.sbomify.com/CVE-2014-7186/): Memory corruption in n/a (critical 10.0)
- [CVE-2014-7187](https://insights.sbomify.com/CVE-2014-7187/): Memory corruption in n/a (critical 10.0)
- [CVE-2014-6277](https://insights.sbomify.com/CVE-2014-6277/): Code injection in n/a (critical 10.0)
- [CVE-2019-18276](https://insights.sbomify.com/CVE-2019-18276/): Privilege escalation in n/a (high 7.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-3715 is a high-severity memory corruption vulnerability in Redhat Enterprise Linux, published on 5 Jan 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-3715 exists.

Affected product: Redhat Enterprise 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-3715/ (Markdown: https://insights.sbomify.com/CVE-2022-3715/index.md)
```

## Sources

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

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