# CVE-2022-28948: gopkg.in/yaml.v3 Denial of Service

> An attacker can crash applications using the Go-Yaml library by providing invalid input to the Unmarshal function, causing a denial of service.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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:** 19 May 2022
- **Updated:** 3 Aug 2024
- **Also known as:** AZL-31966, CLEANSTART-2025-JA36317, CLEANSTART-2025-JX95241, CLEANSTART-2025-OQ82091, CLEANSTART-2026-BY73125, DEBIAN-CVE-2022-28948, GHSA-hp87-p4gw-j4gq, GO-2022-0603, SUSE-SU-2025:02998-1, SUSE-SU-2025:02999-1, SUSE-SU-2025:03000-1, SUSE-SU-2025:03001-1, SUSE-SU-2026:22997-1, UBUNTU-CVE-2022-28948, openSUSE-SU-2025:15510-1, openSUSE-SU-2026:21457-1

## What is CVE-2022-28948?

CVE-2022-28948 is a high-severity denial of service vulnerability in n/a, published on 19 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue in the Unmarshal function in Go-Yaml v3 causes the program to crash when attempting to deserialize invalid input.

Weakness: CWE-502 (Deserialization of Untrusted Data)

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

3 open source packages ship an affected version, including gopkg.in/yaml.v3. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gopkg.in/yaml.v3` | Go | All versions | 3.0.0-20220521103104-8f96da9f5d5e |
| `gopkg.in/yaml.v3` | Go | All versions | 3.0.1 |
| `gopkg.in/yaml.v3` | Go | All versions | 3.0.1 |
| `hawk-apiserver` | SUSE:Linux Enterprise High Availability Extension 16.0 | All versions | 0.1.0+git.1781014483.1c464f2-160000.1.1 |
| `ignition` | SUSE:Linux Enterprise Micro 5.1 | All versions | 2.14.0-150300.4.16.1 |
| `ignition` | SUSE:Linux Enterprise Micro 5.2 | All versions | 2.14.0-150300.6.16.1 |
| `ignition` | SUSE:Linux Enterprise Micro 5.3 | All versions | 2.14.0-150400.4.12.1 |
| `ignition` | SUSE:Linux Enterprise Module for HPC 15 SP6 | All versions | 2.14.0-150400.9.12.1 |
| `ignition` | SUSE:Linux Enterprise Module for HPC 15 SP7 | All versions | 2.14.0-150400.9.12.1 |
| `ignition` | openSUSE:Leap 15.6 | All versions | 2.14.0-150400.9.12.1 |
| `hawk-apiserver` | openSUSE:Leap 16.0 | All versions | 0.1.0+git.1781014483.1c464f2-160000.1.1 |
| `traefik2` | openSUSE:Tumbleweed | All versions | 2.11.29-1.1 |

Products: Netapp Astra Trident, Yaml Project Yaml.

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

Upgrade gopkg.in/yaml.v3 to a fixed version for your release line: 3.0.0-20220521103104-8f96da9f5d5e or 3.0.1.

## Is CVE-2022-28948 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2022-28948 is a high-severity denial of service vulnerability in n/a, published on 19 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-28948 in the wild and no public exploit code.

Affected packages and fixed versions:
- gopkg.in/yaml.v3 (Go): affected all versions; fixed in 3.0.0-20220521103104-8f96da9f5d5e
- gopkg.in/yaml.v3 (Go): affected all versions; fixed in 3.0.1
- gopkg.in/yaml.v3 (Go): affected all versions; fixed in 3.0.1

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-28948/ (Markdown: https://insights.sbomify.com/CVE-2022-28948/index.md)
```

## Sources

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

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