CVE-2020-8927: Brotli Library Buffer Overflow in Bitnami dotnet-sdk

dotnet-sdk Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2020-36846: Buffer overflow in Brotli library. Affects dotnet-sdk versions >= 5.0.0, < 5.0.15. Fixed in 5.0.15. How to fix ↓

Also tracked for

The same CVE-2020-36846 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Bitnami dotnet-sdk is a software development kit (SDK) that provides tools and libraries for developing .NET applications. It includes the Brotli library, which is used for data compression and decompression. Brotli is vulnerable to a buffer overflow issue in versions prior to 1.0.8. This vulnerability allows an attacker to trigger a crash by controlling the input length of a "one-shot" decompression request to a script. The crash occurs when copying over chunks of data larger than 2 GiB.

Vulnerability Detail

The buffer overflow vulnerability in the Brotli library can be exploited by an attacker to cause a crash in the dotnet-sdk application. This can lead to a denial-of-service (DoS) condition, impacting the availability of the application. The vulnerability can be triggered by sending a specially crafted input length to a decompression script. To mitigate the risk, it is recommended to update the Brotli library to version 1.0.8 or later. Alternatively, using the "streaming" API instead of the "one-shot" API and imposing chunk size limits can also help mitigate the vulnerability.

How To Fix

Minimum fixed version

5.0.15

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

A possible workaround for this vulnerability is to use the "streaming" API instead of the "one-shot" API and impose chunk size limits. This can be done by modifying the code that interacts with the Brotli library to use the streaming API and set appropriate chunk size limits. Here is an example of how to use the streaming API in C#:

// Create a Brotli decompressor
using (var decompressor = new BrotliStream(input, CompressionMode.Decompress))
{
    // Set the chunk size limit
    decompressor.SetChunkSizeLimit(chunkSizeLimit);

    // Read and process the decompressed data
    byte[] buffer = new byte[bufferSize];
    int bytesRead;
    while ((bytesRead = decompressor.Read(buffer, 0, buffer.Length)) > 0)
    {
        // Process the decompressed data
        ProcessData(buffer, bytesRead);
    }
}

Conclusion

The Brotli library in the Bitnami dotnet-sdk is vulnerable to a buffer overflow issue. To mitigate the risk, it is recommended to update the Brotli library to version 1.0.8 or later. Alternatively, using the "streaming" API instead of the "one-shot" API and imposing chunk size limits can help mitigate the vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for dotnet-sdk →

Share this vulnerability

FAQ

The vulnerability allows an attacker to trigger a crash in the dotnet-sdk application, leading to a denial-of-service (DoS) condition. This can impact the availability of the application.

To mitigate the risk, it is recommended to update the Brotli library to version 1.0.8 or later. Alternatively, using the "streaming" API instead of the "one-shot" API and imposing chunk size limits can also help mitigate the vulnerability.

Yes, a possible workaround is to use the "streaming" API instead of the "one-shot" API and impose chunk size limits. This can help mitigate the vulnerability without updating the Brotli library.

To update the Brotli library, you need to update the dotnet-sdk package to a version that includes the updated Brotli library. Check the documentation or release notes of the dotnet-sdk package for instructions on how to update.

Yes, here is an example of how to use the streaming API in C#:

// Create a Brotli decompressor
using (var decompressor = new BrotliStream(input, CompressionMode.Decompress))
{
    // Set the chunk size limit
    decompressor.SetChunkSizeLimit(chunkSizeLimit);

    // Read and process the decompressed data
    byte[] buffer = new byte[bufferSize];
    int bytesRead;
    while ((bytesRead = decompressor.Read(buffer, 0, buffer.Length)) > 0)
    {
        // Process the decompressed data
        ProcessData(buffer, bytesRead);
    }
}

Related vulnerabilities

Recent vulnerabilities recorded for dotnet-sdk.

How To Fix

Minimum fixed version

5.0.15

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback