CVE-2021-21285: Github.com/moby/moby Moby Docker Daemon Crash During Vulnerability
MODERATECVE-2021-21285 is a MODERATE (CVSS 6.5) moby docker daemon crash during vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/moby/moby libraries in the Go ecosystem. The issue involves moby docker daemon crash during image pull of malicious image. Remediation is available by upgrading affected packages to version 19.3.15, 20.10.3.
CVE-2021-21285 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:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-21285
To remediate this vulnerability, upgrade all affected Github.com/moby/moby 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 github.com/moby/moby to 19.3.15
Upgrade github.com/moby/moby to 20.10.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/moby/moby
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-21285, inspect your project dependencies for Github.com/moby/moby:
inspect dependencies for github.com/moby/moby
Analyze the terminal output to locate any version of Github.com/moby/moby in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 19.3.15), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/moby/moby, 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-2021-21285 Affected Github.com/moby/moby Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/moby/moby
|
Go |
< 19.3.15
|
19.3.15
|
|
github.com/moby/moby
|
Go |
≥ 20.10.0-beta1
< 20.10.3
|
20.10.3
|
References
Frequently Asked Questions
What is CVE-2021-21285?
Which Github.com/moby/moby versions are affected?
What version fixes CVE-2021-21285?
Is github.com/moby/moby affected?
What is the CVSS score of CVE-2021-21285?
What CWE is associated with CVE-2021-21285?
How can I check Go dependencies for CVE-2021-21285?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6fj5-m822-rqx8",
"modified" : "2024-06-10T18:39:20Z",
"published" : "2024-01-31T23:16:46Z",
"aliases" : [ "CVE-2021-21285" ],
"summary" : "moby docker daemon crash during image pull of malicious image",
"details" : "### Impact\n\nPulling an intentionally malformed Docker image manifest crashes the `dockerd` daemon.\n\n### Patches\n\nVersions 20.10.3 and 19.03.15 contain patches that prevent the daemon from crashing.\n\n### Credits\n\nMaintainers would like to thank Josh Larsen, Ian Coldwater, Duffie Cooley, Rory McCune for working on the vulnerability and Brad Geesaman for responsibly disclosing it to security@docker.com.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/moby/moby"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "19.3.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/moby/moby"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "20.10.0-beta1"
}, {
"fixed" : "20.10.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/moby/moby/security/advisories/GHSA-6fj5-m822-rqx8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21285"
}, {
"type" : "WEB",
"url" : "https://github.com/moby/moby/commit/8d3179546e79065adefa67cc697c09d0ab137d30"
}, {
"type" : "WEB",
"url" : "https://docs.docker.com/engine/release-notes/#20103"
}, {
"type" : "WEB",
"url" : "https://github.com/moby/moby/releases/tag/v19.03.15"
}, {
"type" : "WEB",
"url" : "https://github.com/moby/moby/releases/tag/v20.10.3"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202107-23"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20210226-0005"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2021/dsa-4865"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-754" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-31T23:16:46Z",
"nvd_published_at" : "2021-02-02T18:15:00Z"
}
}