# CVE-2021-36980: Use after free in n/a

> A use-after-free vulnerability in Open vSwitch allows attackers to potentially execute arbitrary code or cause a denial of service via crafted RAW_ENCAP actions.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Jul 2021
- **Updated:** 5 May 2025
- **Also known as:** AZL-6781, DEBIAN-CVE-2021-36980, GHSA-ww48-mfpv-wc3r, OESA-2021-1304, RHBA-2021:1163, RHBA-2021:1166, RHBA-2021:2508, RHBA-2021:2509, RHBA-2022:8558, RHSA-2021:3942, SUSE-SU-2022:3096-1, SUSE-SU-2022:3098-1, SUSE-SU-2022:3099-1, SUSE-SU-2022:3116-1, UBUNTU-CVE-2021-36980, USN-5065-1, openSUSE-SU-2024:11898-1

## What is CVE-2021-36980?

CVE-2021-36980 is a medium-severity use after free vulnerability in n/a, published on 20 Jul 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Open vSwitch (aka openvswitch) 2.11.0 through 2.15.0 has a use-after-free in decode_NXAST_RAW_ENCAP (called from ofpact_decode and ofpacts_decode) during the decoding of a RAW_ENCAP action.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2021-36980?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openvswitch2.11` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.11.3-89.el7fdp |
| `openvswitch2.11-debuginfo` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.11.3-89.el7fdp |
| `openvswitch2.11-devel` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.11.3-89.el7fdp |
| `openvswitch2.11-test` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.11.3-89.el7fdp |
| `openvswitch2.13` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.13.0-102.el7fdp |
| `openvswitch2.13-debuginfo` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.13.0-102.el7fdp |
| `openvswitch2.13-devel` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.13.0-102.el7fdp |
| `openvswitch2.13-ipsec` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.13.0-102.el7fdp |
| `openvswitch2.13-test` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.13.0-102.el7fdp |
| `python-openvswitch2.11` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.11.3-89.el7fdp |
| `python3-openvswitch2.13` | Red Hat:enterprise_linux:7::fastdatapath | All versions | 0:2.13.0-102.el7fdp |
| `openvswitch2.11` | Red Hat:enterprise_linux:7::hypervisor | All versions | 0:2.11.3-89.el7fdp |
| `openvswitch2.11-debuginfo` | Red Hat:enterprise_linux:7::hypervisor | All versions | 0:2.11.3-89.el7fdp |
| `openvswitch2.11-devel` | Red Hat:enterprise_linux:7::hypervisor | All versions | 0:2.11.3-89.el7fdp |
| `python-openvswitch2.11` | Red Hat:enterprise_linux:7::hypervisor | All versions | 0:2.11.3-89.el7fdp |
| `network-scripts-openvswitch2.11` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `network-scripts-openvswitch2.13` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `network-scripts-openvswitch2.15` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `openvswitch2.11` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `openvswitch2.11-debuginfo` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `openvswitch2.11-debugsource` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `openvswitch2.11-devel` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `openvswitch2.11-test` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `openvswitch2.13` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `openvswitch2.13-debuginfo` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `openvswitch2.13-debugsource` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `openvswitch2.13-devel` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `openvswitch2.13-ipsec` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `openvswitch2.13-test` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `openvswitch2.15` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `openvswitch2.15-debuginfo` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `openvswitch2.15-debugsource` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `openvswitch2.15-devel` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `openvswitch2.15-ipsec` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `openvswitch2.15-test` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |
| `python3-openvswitch2.11` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `python3-openvswitch2.11-debuginfo` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.11.3-86.el8fdp |
| `python3-openvswitch2.13` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `python3-openvswitch2.13-debuginfo` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.13.0-114.el8fdp |
| `python3-openvswitch2.15` | Red Hat:enterprise_linux:8::fastdatapath | All versions | 0:2.15.0-24.el8fdp |

Products: Openvswitch Openvswitch.

## How do I fix CVE-2021-36980?

Apply the vendor's patch.

## Is CVE-2021-36980 being exploited?

There is no known exploitation of CVE-2021-36980 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2017-9264](https://insights.sbomify.com/CVE-2017-9264/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-9265](https://insights.sbomify.com/CVE-2017-9265/): Memory corruption in n/a (critical 9.8)
- [CVE-2016-2074](https://insights.sbomify.com/CVE-2016-2074/): Memory corruption in n/a (critical 9.8)
- [CVE-2016-10377](https://insights.sbomify.com/CVE-2016-10377/): Integer overflow in n/a (high 8.8)
- [CVE-2024-22563](https://insights.sbomify.com/CVE-2024-22563/): Denial of service in n/a (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-36980 and fix it if it is affected.

What it is: CVE-2021-36980 is a medium-severity use after free vulnerability in n/a, published on 20 Jul 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-36980 in the wild and no public exploit code.

Affected product: n/a. 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-2021-36980/ (Markdown: https://insights.sbomify.com/CVE-2021-36980/index.md)
```

## Sources

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

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