Advisory

GHSA-c5q2-7r4c-mv6g

Also known as: CVE-2024-28180, GO-2024-2631

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-03-07 22:54 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

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

Go · All systems

Affected

  • introduced 0, fixed 4.0.1 (semver)

Fixed versions

4.0.1

Fix

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

Go · All systems

Affected

  • introduced 0, fixed 3.0.3 (semver)

Fixed versions

3.0.3

Fix

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

Go · All systems

Affected

  • introduced 0, fixed 2.6.3 (semver)

Fixed versions

2.6.3

Fix

gopkg.in/square/go-jose.v2

Go · All systems

Affected

  • introduced 0, last affected 2.6.0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences