Uncontrolled Resource Consumption Affecting sixlabors.imagesharp package, versions [,2.1.9) [3.0.0,3.1.5)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.33% (72nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-DOTNET-SIXLABORSIMAGESHARP-7547407
  • published 23 Jul 2024
  • disclosed 22 Jul 2024
  • credit Brecht Carlier

How to fix?

Upgrade SixLabors.ImageSharp to version 2.1.9, 3.1.5 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption through the Gif decoder. An attacker can cause the application to consume excessive memory resources by processing specially crafted image files.

Workaround

This vulnerability can be mitigated by using Image.Identify before calling Image.Decode(Async) to determine the image dimensions and enforce a limit.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
6.9 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    None
  • Integrity (VI)
    None
  • Availability (VA)
    Low
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None