Improper Handling of Highly Compressed Data (Data Amplification) Affecting github.com/russellhaering/gosaml2 package, versions <0.9.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.13% (51st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMRUSSELLHAERINGGOSAML2-3338525
  • published3 Mar 2023
  • disclosed2 Mar 2023
  • creditNorbert Szetei

Introduced: 2 Mar 2023

CVE-2023-26483  (opens in a new tab)
CWE-409  (opens in a new tab)

How to fix?

Upgrade github.com/russellhaering/gosaml2 to version 0.9.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) by allowing 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.

Workaround

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.

CVSS Base Scores

version 3.1