CVE-2021-3912: Resource exhaustion via GZIP bomb in github.com/cloudflare/cfrpki

github.com/cloudflare/cfrpki Updated 02 Oct 2025

Summary

15/07/2022
Yes i
Moderate
4.2

CVE-2021-3912: Resource exhaustion via GZIP bomb in github.com/cloudflare/cfrpki. Affects github.com/cloudflare/cfrpki versions < 1.4.0. Fixed in 1.4.0. How to fix ↓

Also tracked for

The same CVE-2021-3912 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package under scrutiny is github.com/cloudflare/cfrpki, which is part of the Go ecosystem. This package provides functionality for handling Certificate Authority (CA) Resource Public Key Infrastructure (RPKI) data. It includes the HTTPFetcher.GetXML function, which is responsible for fetching XML data from a remote server. The vulnerability in this package allows for resource exhaustion through the use of a GZIP bomb. By sending a response of unlimited size, an attacker can consume excessive memory resources, leading to denial of service (DoS) conditions.

Vulnerability Detail

The vulnerability (CVE-2021-3912) arises from the HTTPFetcher.GetXML function's ability to read a response of unlimited size into memory. This unrestricted behavior allows an attacker to send a GZIP bomb, which is a compressed file that expands to an enormous size when decompressed. As a result, the system's memory resources can be exhausted, leading to a DoS situation. This vulnerability can be exploited remotely by an attacker with network access to the affected system. The impact of this vulnerability can range from temporary unavailability of the affected service to a complete system crash.

How To Fix

Latest published version: v1.5.10 as of 23 Oct 2026

go get github.com/cloudflare/cfrpki@v1.5.10

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.0

This is the first release that contains the fix.

go get github.com/cloudflare/cfrpki@v1.4.0

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

Workaround

As a workaround, developers can manually limit the size of the response being read by modifying the code in the HTTPFetcher.GetXML function. Here is an example of how the code can be modified:

def GetXML(url string) ([]byte, error) {
  // Set a maximum response size
  maxResponseSize := 10 * 1024 * 1024 // 10MB

  // Make the HTTP request
  resp, err := http.Get(url)
  if err != nil {
    return nil, err
  }

  // Read the response
  body, err := ioutil.ReadAll(io.LimitReader(resp.Body, maxResponseSize))
  if err != nil {
    return nil, err
  }

  // Close the response body
  resp.Body.Close()

  return body, nil
}

Conclusion

In conclusion, the github.com/cloudflare/cfrpki package is vulnerable to a resource exhaustion vulnerability (CVE-2021-3912) that can be exploited through the use of a GZIP bomb. This vulnerability can lead to denial of service (DoS) conditions, impacting the availability of the affected service. It is recommended to update the package to version 1.4.0 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/cloudflare/cfrpki →

Share this vulnerability

FAQ

The impact of this vulnerability can range from temporary unavailability of the affected service to a complete system crash.

An attacker can exploit this vulnerability by sending a GZIP bomb, which is a compressed file that expands to an enormous size when decompressed. By consuming excessive memory resources, the attacker can cause denial of service (DoS) conditions.

Yes, this vulnerability affects versions prior to 1.4.0 of the github.com/cloudflare/cfrpki package.

Yes, this vulnerability can be exploited remotely by an attacker with network access to the affected system.

To fix this vulnerability, update the github.com/cloudflare/cfrpki package to version 1.4.0 or later.

References

Related vulnerabilities

Recent vulnerabilities recorded for github.com/cloudflare/cfrpki.

How To Fix

Latest published version: v1.5.10 as of 23 Oct 2026

go get github.com/cloudflare/cfrpki@v1.5.10

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.0

This is the first release that contains the fix.

go get github.com/cloudflare/cfrpki@v1.4.0

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