Gosaml2 · Gosaml2 · CVE-2023-26483
**Name of the Vulnerable Software and Affected Versions**
gosaml2 versions prior to 0.9.0
**Description**
A bug in the gosaml2 library enables attackers to craft a `deflate`-compressed request which will consume significantly more memory during processing than the size of the original request. This may eventually lead to memory exhaustion and the process being killed. The maximum compression ratio achievable with `deflate` is 1032:1. By limiting the size of bodies passed to gosaml2, limiting the rate and concurrency of calls, and ensuring that lots of memory is available to the process, it may be possible to help Go's garbage collector "keep up". However, implementors are encouraged not to rely on this.
**Recommendations**
For versions prior to 0.9.0, update to version 0.9.0 to resolve the issue. As a temporary workaround, consider limiting the size of bodies passed to gosaml2, limiting the rate and concurrency of calls, and ensuring that lots of memory is available to the process to help mitigate the risk of memory exhaustion.