NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Go

CVE-2024-28180: Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification)

mediumCVSS 3.1 4.3GHSA-c5q2-7r4c-mv6g

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.

Published Mar 7, 2024 · Updated Jun 12, 2024

Affected packages

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

Ecosystem
Go
Affected
< 4.0.1
Fixed in
4.0.1
Check
go list -m github.com/go-jose/go-jose/v4

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

Ecosystem
Go
Affected
< 3.0.3
Fixed in
3.0.3
Check
go list -m github.com/go-jose/go-jose/v3

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

Ecosystem
Go
Affected
< 2.6.3
Fixed in
2.6.3
Check
go list -m gopkg.in/go-jose/go-jose.v2

gopkg.in/square/go-jose.v2

Ecosystem
Go
Affected
<= 2.6.0
Fixed in
No patched version yet
Check
go list -m gopkg.in/square/go-jose.v2

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to zer0yu, chenjj, hectorj2f, vrv7567.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Go vulnerabilities

All Go entries