GHSA-c5q2-7r4c-mv6g

Suggest an improvement
Source
https://github.com/advisories/GHSA-c5q2-7r4c-mv6g
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/03/GHSA-c5q2-7r4c-mv6g/GHSA-c5q2-7r4c-mv6g.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-c5q2-7r4c-mv6g
Aliases
Related
Published
2024-03-07T22:54:44Z
Modified
2024-07-15T22:12:27.387491Z
Severity
  • 4.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification)
Details

Impact

An attacker could send a JWE containing compressed data that used large amounts of memory and CPU when decompressed by Decrypt or DecryptMulti. Those functions now return an error if the decompressed data would exceed 250kB or 10x the compressed size (whichever is larger). Thanks to Enze Wang@Alioth and Jianjun Chen@Zhongguancun Lab (@zer0yu and @chenjj) for reporting.

Patches

The problem is fixed in the following packages and versions: - github.com/go-jose/go-jose/v4 version 4.0.1 - github.com/go-jose/go-jose/v3 version 3.0.3 - gopkg.in/go-jose/go-jose.v2 version 2.6.3

The problem will not be fixed in the following package because the package is archived: - gopkg.in/square/go-jose.v2

References

Affected packages

Go / github.com/go-jose/go-jose/v4

Package

Name
github.com/go-jose/go-jose/v4
View open source insights on deps.dev
Purl
pkg:golang/github.com/go-jose/go-jose/v4

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.0.1

Go / github.com/go-jose/go-jose/v3

Package

Name
github.com/go-jose/go-jose/v3
View open source insights on deps.dev
Purl
pkg:golang/github.com/go-jose/go-jose/v3

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3

Go / gopkg.in/go-jose/go-jose.v2

Package

Name
gopkg.in/go-jose/go-jose.v2
View open source insights on deps.dev
Purl
pkg:golang/gopkg.in/go-jose/go-jose.v2

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.6.3

Go / gopkg.in/square/go-jose.v2

Package

Name
gopkg.in/square/go-jose.v2
View open source insights on deps.dev
Purl
pkg:golang/gopkg.in/square/go-jose.v2

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
2.6.0