CVE-2023-28119: Denial Of Service Via Deflate Decompression Bomb in github.com/crewjam/saml
Summary
CVE-2023-28119: crewjam/saml vulnerable to Denial Of Service Via Deflate Decompression Bomb. Affects github.com/crewjam/saml versions < 0.4.13. Fixed in 0.4.13. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The github.com/crewjam/saml package is a Go library that provides functionality for processing SAML (Security Assertion Markup Language) messages. It is commonly used in applications that require SAML-based authentication and authorization. The package allows for the parsing, generation, and validation of SAML messages, making it a crucial component in SAML-based systems. However, a vulnerability has been discovered in the package that could lead to a Denial of Service (DoS) attack.
Vulnerability Detail
The vulnerability in github.com/crewjam/saml arises from the improper handling of input data during the decompression process using the Deflate algorithm. The package uses flate.NewReader, which does not limit the size of the input. An attacker can exploit this by sending a large amount of data in the HTTP request, causing the server-side decompression to consume excessive resources. By repeatedly sending the same request, the attacker can trigger a crash, as the operating system kills the process. This vulnerability has a CVSS score of 7.5, indicating a high severity level.
How To Fix
Latest published version: v0.5.1 as of 23 Oct 2026
go get github.com/crewjam/saml@v0.5.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.4.13
This is the first release that contains the fix.
go get github.com/crewjam/saml@v0.4.13
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, developers can implement input size validation at the application level. By checking the size of the input data before passing it to the github.com/crewjam/saml package, developers can prevent excessively large requests from triggering the vulnerability. Here is an example of how to implement input size validation in Go:
import (
"net/http"
"io/ioutil"
)
func handleSAMLRequest(w http.ResponseWriter, r *http.Request) {
maxRequestSize := 1024 * 1024 // 1 MB
body, err := ioutil.ReadAll(io.LimitReader(r.Body, maxRequestSize))
if err != nil {
// Handle error
}
// Process the SAML request
}
Conclusion
The vulnerability in github.com/crewjam/saml can lead to a Denial of Service (DoS) attack, potentially causing the affected application or service to become unavailable. It is crucial to update the package to version 0.4.13 or later to mitigate the risk. Implementing input size validation at the application level can serve as a temporary workaround. For further assistance and support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for github.com/crewjam/saml →
FAQ
The vulnerability allows an attacker to perform a Denial of Service (DoS) attack by sending specially crafted HTTP requests. This can lead to the unavailability of the affected application or service, disrupting its normal operation.
No, authentication is not required to exploit this vulnerability. An attacker can trigger the vulnerability by sending malicious HTTP requests without any authentication.
No, versions prior to 0.4.13 of the github.com/crewjam/saml package are affected by this vulnerability. Updating to version 0.4.13 or later will address the issue.
At the time of this advisory, there are no known public exploits specifically targeting this vulnerability. However, it is important to promptly update the package to mitigate the risk of a potential exploit.
For more information about this vulnerability, you can refer to the GitHub Security Advisory GHSA-5mqj-xc49-246p at https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/03/GHSA-5mqj-xc49-246p/GHSA-5mqj-xc49-246p.json
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/crewjam/saml.