Is gopkg.in/yaml.v2 2.0 vulnerable?

Go · 1 release from 2.0.0 to 2.0.0 · latest gopkg.in/yaml.v2 is 2.4.0 · checked 18 Nov 2026

Yes: 6 known advisories

Yes. gopkg.in/yaml.v2 2.0.0, the last 2.0 release, is affected by 6 known security advisories (1 high, 2 medium, 3 low), including CVE-2022-3064, CVE-2021-4235, CVE-2019-11254. Upgrade to 2.2.8 or later to fix all of them.

Upgrade with:go get gopkg.in/yaml.v2@v2.2.8

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

Advisories affecting gopkg.in/yaml.v2 2.0.0

  • MediumCVE-2021-4235GHSA-r88r-gmrh-7j8328 Dec 2022

    YAML Go package vulnerable to denial of service

    Affected
    <2.2.3
    Fixed in
    2.2.3
  • HighCVE-2022-3064GHSA-6q6q-88xp-6f2r28 Dec 2022

    yaml package for Go can consume excessive amounts of CPU or memory

    Affected
    <2.2.4
    Fixed in
    2.2.4
  • LowCVE-2022-3064GO-2022-095629 Aug 2022

    Excessive resource consumption in gopkg.in/yaml.v2

    Affected
    <2.2.4
    Fixed in
    2.2.4
  • MediumCVE-2019-11254GHSA-wxc4-f4m6-wwqv20 Dec 2021

    Excessive Platform Resource Consumption within a Loop in Kubernetes

    Affected
    <2.2.8
    Fixed in
    2.2.8
  • LowCVE-2019-11254GO-2020-003614 Apr 2021

    Excessive resource consumption in YAML parsing in gopkg.in/yaml.v2

    Affected
    <2.2.8
    Fixed in
    2.2.8
  • LowCVE-2021-4235GO-2021-006114 Apr 2021

    Denial of service in gopkg.in/yaml.v2

    Affected
    <2.2.3
    Fixed in
    2.2.3

Which of your client projects are still on gopkg.in/yaml.v2 2.0?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact gopkg.in/yaml.v2 version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other gopkg.in/yaml.v2 versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the Go registry. Refreshed daily.