Headline
GHSA-c5q2-7r4c-mv6g: Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification)
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 v4.0.1, v3.0.3, v2.6.3
- GitHub Advisory Database
- GitHub Reviewed
- GHSA-c5q2-7r4c-mv6g
Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification)
Moderate severity GitHub Reviewed Published Mar 7, 2024 in go-jose/go-jose • Updated Mar 7, 2024
Package
gomod github.com/go-jose/go-jose/v3 (Go)
Affected versions
< 3.0.3
gomod github.com/go-jose/go-jose/v4 (Go)
gomod gopkg.in/go-jose/go-jose.v2 (Go)
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 v4.0.1, v3.0.3, v2.6.3
References
- GHSA-c5q2-7r4c-mv6g
- go-jose/go-jose@0dd4dd5
- go-jose/go-jose@add6a28
- go-jose/go-jose@f4c051a
Published to the GitHub Advisory Database
Mar 7, 2024