CVE-2021-24112: System.Drawing.Common Remote Code Execution Vulnerability
CRITICALCVE-2021-24112 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (General Security Weakness) affecting System.Drawing.Common libraries in the NuGet ecosystem. The issue involves .net core remote code execution vulnerability. Remediation is available by upgrading affected packages to version 4.7.2, 5.0.3.
CVE-2021-24112 at a Glance
Security Impact
CVSS: 9.8
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:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-24112
To remediate this vulnerability, upgrade all affected System.Drawing.Common 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 System.Drawing.Common to 4.7.2
Upgrade System.Drawing.Common to 5.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for System.Drawing.Common
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-24112, inspect your project dependencies for System.Drawing.Common:
inspect dependencies for System.Drawing.Common
Analyze the terminal output to locate any version of System.Drawing.Common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.7.2), 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 General Security Weakness. In System.Drawing.Common, 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-24112 Affected System.Drawing.Common Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
System.Drawing.Common
|
NuGet |
≥ 4.0.0
< 4.7.2
|
4.7.2
|
|
System.Drawing.Common
|
NuGet |
≥ 5.0.0
< 5.0.3
|
5.0.3
|
References
Frequently Asked Questions
What is CVE-2021-24112?
Which System.Drawing.Common versions are affected?
What version fixes CVE-2021-24112?
Is System.Drawing.Common affected?
What is the CVSS score of CVE-2021-24112?
What CWE is associated with CVE-2021-24112?
How can I check NuGet dependencies for CVE-2021-24112?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rxg9-xrhp-64gj",
"modified" : "2022-10-25T17:35:53Z",
"published" : "2022-05-24T17:43:19Z",
"aliases" : [ "CVE-2021-24112" ],
"summary" : ".NET Core Remote Code Execution Vulnerability",
"details" : "A remote code execution vulnerability exists when parsing certain types of graphics files. This vulnerability only exists on systems running on MacOS or Linux. This CVE ID is unique from CVE-2021-26701.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "System.Drawing.Common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.7.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "System.Drawing.Common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-24112"
}, {
"type" : "WEB",
"url" : "https://github.com/dotnet/announcements/issues/176"
}, {
"type" : "WEB",
"url" : "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-24112"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-10-25T17:35:53Z",
"nvd_published_at" : "2021-02-25T23:15:00Z"
}
}