CVE-2019-11254: Gopkg.in/yaml.v2 Remote Code Execution Vulnerability
MODERATECVE-2019-11254 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-1050: Excessive Platform Resource Consumption within a Loop) affecting Gopkg.in/yaml.v2 libraries in the Go ecosystem. The issue involves excessive platform resource consumption within a loop in kubernetes. Remediation is available by upgrading affected packages to version 2.2.8.
CVE-2019-11254 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2019-11254
To remediate this vulnerability, upgrade all affected Gopkg.in/yaml.v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade gopkg.in/yaml.v2 to 2.2.8
Upgrade github.com/go-yaml/yaml to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gopkg.in/yaml.v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2019-11254, inspect your project dependencies for Gopkg.in/yaml.v2:
inspect dependencies for gopkg.in/yaml.v2
Analyze the terminal output to locate any version of Gopkg.in/yaml.v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1050: Excessive Platform Resource Consumption within a Loop, where the product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors. In Gopkg.in/yaml.v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-11254 Affected Gopkg.in/yaml.v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gopkg.in/yaml.v2
|
Go |
< 2.2.8
|
2.2.8
|
|
github.com/go-yaml/yaml
|
Go |
≤ 2.1.0
|
|
References
Frequently Asked Questions
What is CVE-2019-11254?
Which Gopkg.in/yaml.v2 versions are affected?
What version fixes CVE-2019-11254?
Is gopkg.in/yaml.v2 affected?
Is github.com/go-yaml/yaml affected?
What is the CVSS score of CVE-2019-11254?
What CWE is associated with CVE-2019-11254?
How can I check Go dependencies for CVE-2019-11254?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wxc4-f4m6-wwqv",
"modified" : "2023-02-09T17:45:10Z",
"published" : "2021-12-20T16:55:06Z",
"aliases" : [ "CVE-2019-11254" ],
"summary" : "Excessive Platform Resource Consumption within a Loop in Kubernetes",
"details" : "The Kubernetes API Server component in versions 1.1-1.14, and versions prior to 1.15.10, 1.16.7 and 1.17.3 allows an authorized user who sends malicious YAML payloads to cause the kube-apiserver to consume excessive CPU cycles while parsing YAML.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gopkg.in/yaml.v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-yaml/yaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-11254"
}, {
"type" : "WEB",
"url" : "https://github.com/kubernetes/kubernetes/issues/89535"
}, {
"type" : "WEB",
"url" : "https://github.com/go-yaml/yaml/pull/555"
}, {
"type" : "WEB",
"url" : "https://github.com/kubernetes/kubernetes/pull/87467/commits/b86df2bec4f377afc0ca03482ffad2f0a49a83b8"
}, {
"type" : "WEB",
"url" : "https://github.com/go-yaml/yaml/commit/53403b58ad1b561927d19068c655246f2db79d48"
}, {
"type" : "WEB",
"url" : "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18496"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/d/msg/kubernetes-announce/ALL9s73E5ck/4yHe8J-PBAAJ"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2020-0036"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20200413-0003"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1050" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-07T17:24:04Z",
"nvd_published_at" : null
}
}