LowGO-2021-0061CVE-2021-4235GHSA-r88r-gmrh-7j83

Denial of service in gopkg.in/yaml.v2

Published 14 Apr 2021 · Updated 4 Feb 2026

Is your project on an affected gopkg.in/yaml.v2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<2.2.3
Fixed in
2.2.3
Update to the fixed version for your release line, for example:go get gopkg.in/yaml.v2@v2.2.3
Affected
All versions
Fixed in
No fix released

Details

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.

Is GO-2021-0061 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected gopkg.in/yaml.v2, and gives you the command that fixes it.

More advisories for gopkg.in/yaml.v2

  • HighCVE-2022-3064yaml package for Go can consume excessive amounts of CPU or memory · 28 Dec 2022
  • LowCVE-2022-3064Excessive resource consumption in gopkg.in/yaml.v2 · 29 Aug 2022
  • MediumCVE-2019-11254Excessive Platform Resource Consumption within a Loop in Kubernetes · 20 Dec 2021
  • LowCVE-2019-11254Excessive resource consumption in YAML parsing in gopkg.in/yaml.v2 · 14 Apr 2021
gopkg.in/yaml.v2 security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.