CVE-2024-28180: Github.com/go jose/go jose/v4 Go JOSE Vulnerable To Improper Vulnerability

MODERATE
Advisory Identifier: GHSA-c5q2-7r4c-mv6g
CVSS 4.3
CWE-409
Published
Advisory Summary

CVE-2024-28180 is a MODERATE (CVSS 4.3) go jose vulnerable to improper vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting Github.com/go jose/go jose/v4 libraries in the Go ecosystem. The issue involves go jose vulnerable to improper handling of highly compressed data (data amplification). Remediation is available by upgrading affected packages to version 4.0.1, 3.0.3, 2.6.3.

CVE-2024-28180 at a Glance

CVE Identifier CVE-2024-28180
GHSA Identifier GHSA-c5q2-7r4c-mv6g
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)
Affected Product Github.com/go jose/go jose/v4
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-28180

To remediate this vulnerability, upgrade all affected Github.com/go jose/go jose/v4 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/go-jose/go-jose/v4 fixed: 4.0.1
Upgrade github.com/go-jose/go-jose/v4 to 4.0.1
github.com/go-jose/go-jose/v3 fixed: 3.0.3
Upgrade github.com/go-jose/go-jose/v3 to 3.0.3
gopkg.in/go-jose/go-jose.v2 fixed: 2.6.3
Upgrade gopkg.in/go-jose/go-jose.v2 to 2.6.3
gopkg.in/square/go-jose.v2 fixed: Latest secure release
Upgrade gopkg.in/square/go-jose.v2 to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/go-jose/go-jose/v4

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-28180, inspect your project dependencies for Github.com/go jose/go jose/v4:

inspect dependencies for github.com/go-jose/go-jose/v4

Analyze the terminal output to locate any version of Github.com/go jose/go jose/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In Github.com/go jose/go jose/v4, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2024-28180 Affected Github.com/go jose/go jose/v4 Versions

4 component(s)
Fixed Versions:
4.0.13.0.32.6.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-jose/go-jose/v4
Go
< 4.0.1
4.0.1
github.com/go-jose/go-jose/v3
Go
< 3.0.3
3.0.3
gopkg.in/go-jose/go-jose.v2
Go
< 2.6.3
2.6.3
gopkg.in/square/go-jose.v2
Go
≤ 2.6.0

References

GitHub Advisory / Wiki ADVISORY
https://github.com/go-jose/go-jose/security/advisories/GHSA-c5q2-7r4c-mv6g
NVD — CVE-2024-28180 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-28180
Security Fix Commit FIX COMMIT
https://github.com/go-jose/go-jose/commit/0dd4dd541c665fb292d664f77604ba694726f298
Security Fix Commit FIX COMMIT
https://github.com/go-jose/go-jose/commit/add6a284ea0f844fd6628cba637be5451fe4b28a
Security Fix Commit FIX COMMIT
https://github.com/go-jose/go-jose/commit/f4c051a0653d78199a053892f7619ebf96339502
Github.com/go jose/go jose/v4 Source Repository REPOSITORY
https://github.com/go-jose/go-jose
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GD2GSBQTBLYADASUBHHZV2CZPTSLIPQJ
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I6MMWFBOXJA6ZCXNVPDFJ4XMK5PVG5RG
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IJ6LAJJ2FTA2JVVOACCV5RZTOIZLXUNJ
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JNPMXL36YGS3GQEVI3Q5HKHJ7YAAQXL5
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KXKGNCRU7OTM5AHC7YIYBNOWI742PRMY
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MSOMHDKRPU3A2JEMRODT2IREDFBLVPGS
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UG5FSEYJ3GP27FZXC5YAAMMEC5XWKJHG
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UJO2U5ACZVACNQXJ5EBRFLFW6DP5BROY
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJDO5VSIAOGT2WP63AXAAWNRSVJCNCRH

Frequently Asked Questions

What is CVE-2024-28180?
CVE-2024-28180 is a security vulnerability in Github.com/go jose/go jose/v4 involving Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification).
Which Github.com/go jose/go jose/v4 versions are affected?
Affected versions include releases prior to 4.0.1, 3.0.3, 2.6.3 across affected packages: github.com/go-jose/go-jose/v4, github.com/go-jose/go-jose/v3, gopkg.in/go-jose/go-jose.v2, gopkg.in/square/go-jose.v2.
What version fixes CVE-2024-28180?
Upgrading to 4.0.1, 3.0.3, 2.6.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-jose/go-jose/v4 affected?
Yes, github.com/go-jose/go-jose/v4 is affected in releases prior to 4.0.1. Upgrade your dependency to 4.0.1 or later.
Is github.com/go-jose/go-jose/v3 affected?
Yes, github.com/go-jose/go-jose/v3 is affected in releases prior to 3.0.3. Upgrade your dependency to 3.0.3 or later.
What is the CVSS score of CVE-2024-28180?
CVE-2024-28180 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-28180?
CVE-2024-28180 is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) (The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.).
How can I check Go dependencies for CVE-2024-28180?
Run the dependency tree command: 'inspect dependencies for github.com/go-jose/go-jose/v4'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c5q2-7r4c-mv6g",
  "modified" : "2025-02-13T19:07:25Z",
  "published" : "2024-03-07T22:54:44Z",
  "aliases" : [ "CVE-2024-28180" ],
  "summary" : "Go JOSE vulnerable to Improper Handling of Highly Compressed Data (Data Amplification)",
  "details" : "### Impact\nAn 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.\n\n### Patches\nThe problem is fixed in the following packages and versions:\n- github.com/go-jose/go-jose/v4 version 4.0.1\n- github.com/go-jose/go-jose/v3 version 3.0.3\n- gopkg.in/go-jose/go-jose.v2 version 2.6.3\n\nThe problem will not be fixed in the following package because the package is archived:\n- gopkg.in/square/go-jose.v2",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-jose/go-jose/v4"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-jose/go-jose/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "gopkg.in/go-jose/go-jose.v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "gopkg.in/square/go-jose.v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/security/advisories/GHSA-c5q2-7r4c-mv6g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-28180"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/commit/0dd4dd541c665fb292d664f77604ba694726f298"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/commit/add6a284ea0f844fd6628cba637be5451fe4b28a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-jose/go-jose/commit/f4c051a0653d78199a053892f7619ebf96339502"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-jose/go-jose"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GD2GSBQTBLYADASUBHHZV2CZPTSLIPQJ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I6MMWFBOXJA6ZCXNVPDFJ4XMK5PVG5RG"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IJ6LAJJ2FTA2JVVOACCV5RZTOIZLXUNJ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JNPMXL36YGS3GQEVI3Q5HKHJ7YAAQXL5"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KXKGNCRU7OTM5AHC7YIYBNOWI742PRMY"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MSOMHDKRPU3A2JEMRODT2IREDFBLVPGS"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UG5FSEYJ3GP27FZXC5YAAMMEC5XWKJHG"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UJO2U5ACZVACNQXJ5EBRFLFW6DP5BROY"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XJDO5VSIAOGT2WP63AXAAWNRSVJCNCRH"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-409" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-07T22:54:44Z",
    "nvd_published_at" : "2024-03-09T01:15:07Z"
  }
}