What’s Vulnerable › Vulnerabilities
CVE-2021-4235: Denial of service in gopkg.in/yaml.v2
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-12-27 · updated 2026-06-17
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.
Affected products
- gopkg.in/yaml.v2: before 2.2.3 — fixed in 2.2.3
- Go Github.Com/Go-Yaml/Yaml: all versions
- Gopkg.In/Yaml.V2: before 2.2.3 — fixed in 2.2.3
How to fix
Upgrade to a fixed version: gopkg.in/yaml.v2 2.2.3; Gopkg.In/Yaml.V2 2.2.3. Check the vendor advisory for mitigations.
References
- https://github.com/go-yaml/yaml/commit/bb4e33bf68bf89cad44d386192cbed201f35b241
- https://github.com/go-yaml/yaml/pull/375
- https://lists.debian.org/debian-lts-announce/2023/07/msg00001.html
- https://pkg.go.dev/vuln/GO-2021-0061
- https://github.com/go-yaml/yaml/commit/bb4e33bf68bf89cad44d386192cbed201f35b241
- https://github.com/go-yaml/yaml/pull/375
- https://lists.debian.org/debian-lts-announce/2023/07/msg00001.html
- https://pkg.go.dev/vuln/GO-2021-0061
Get alerted when CVE-2021-4235 or the next vulnerability affects your stack