Vulnerabilities in pkg:nuget/System.Drawing.Common

PACKAGE
Advisory Identifier: GHSA-rxg9-xrhp-64gj
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/System.Drawing.Common

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/System.Drawing.Common. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rxg9-xrhp-64gj CVE-2021-24112 CRITICAL .NET Core Remote Code Execution Vulnerability

CVE-2021-24112 at a Glance

CVE Identifier CVE-2021-24112
GHSA Identifier GHSA-rxg9-xrhp-64gj
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification General Security Weakness
Affected Product System.Drawing.Common
Package Ecosystem NuGet
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

System.Drawing.Common fixed: 4.7.2
Upgrade System.Drawing.Common to 4.7.2
System.Drawing.Common fixed: 5.0.3
Upgrade System.Drawing.Common to 5.0.3
Verify Direct and Transitive Dependencies

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

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.

CVE-2021-24112 Affected System.Drawing.Common Versions

2 component(s)
Fixed Versions:
4.7.25.0.3
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?
CVE-2021-24112 is a security vulnerability in System.Drawing.Common involving .NET Core Remote Code Execution Vulnerability under General Security Weakness.
Which System.Drawing.Common versions are affected?
Affected versions include releases prior to 4.7.2, 5.0.3 across affected packages: System.Drawing.Common.
What version fixes CVE-2021-24112?
Upgrading to 4.7.2, 5.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is System.Drawing.Common affected?
Yes, System.Drawing.Common is affected in releases prior to 4.7.2, 5.0.3. Upgrade your dependency to 4.7.2, 5.0.3 or later.
What is the CVSS score of CVE-2021-24112?
CVE-2021-24112 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-24112?
CVE-2021-24112 is classified under General Security Weakness.
How can I check NuGet dependencies for CVE-2021-24112?
Run the dependency tree command: 'inspect dependencies for System.Drawing.Common'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}