CVE-2023-26483 gosaml2 vulnerable to Denial of Service via deflate decompression bomb

Medium 5.3 Published Updated

Attackers can cause denial of service in SAML Service Providers using gosaml2 by sending compressed requests that exhaust memory.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-26483?

CVE-2023-26483 is a medium-severity denial of service vulnerability in russellhaering gosaml2, published on 3 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

gosaml2 is a Pure Go implementation of SAML 2.0. SAML Service Providers using this library for SAML authentication support are likely susceptible to Denial of Service attacks. A bug in this 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, so 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". Implementors are encouraged not to rely on this. This issue is fixed in version 0.9.0.

Weakness: CWE-409

Which versions are affected by CVE-2023-26483?

3 open source packages ship an affected version, including github.com/russellhaering/gosaml2. It affects 1 product.

PackageAffectedFixed in
github.com/russellhaering/gosaml2 GoAll versions0.9.0
github.com/russellhaering/gosaml2 GoAll versions0.9.0
github.com/russellhaering/gosaml2 GoAll versions0.9.0

Products include Gosaml2 Project Gosaml2.

How do I fix CVE-2023-26483?

Upgrade github.com/russellhaering/gosaml2 to 0.9.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-26483 being exploited?

There is no known exploitation of CVE-2023-26483 in the wild and no public exploit code.

Sources

Also known as GHSA-6gc3-crp7-25w5, GO-2023-1602.

Is CVE-2023-26483 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free