CVE-2024-28180: Github.com/go jose/go jose/v4 Go JOSE Vulnerable To Improper Vulnerability
MODERATECVE-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
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).
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.
Upgrade github.com/go-jose/go-jose/v4 to 4.0.1
Upgrade github.com/go-jose/go-jose/v3 to 3.0.3
Upgrade gopkg.in/go-jose/go-jose.v2 to 2.6.3
Upgrade gopkg.in/square/go-jose.v2 to Latest secure release
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
CVE-2024-28180 Affected Github.com/go jose/go jose/v4 Versions
4 component(s)| 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
Frequently Asked Questions
What is CVE-2024-28180?
Which Github.com/go jose/go jose/v4 versions are affected?
What version fixes CVE-2024-28180?
Is github.com/go-jose/go-jose/v4 affected?
Is github.com/go-jose/go-jose/v3 affected?
What is the CVSS score of CVE-2024-28180?
What CWE is associated with CVE-2024-28180?
How can I check Go dependencies for CVE-2024-28180?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}