{"id":"CVE-2023-49290","aliases":["GHSA-7f9x-gw85-8grf","GO-2023-2379"],"summary":"Malicious parameters can cause a denial of service in lestrrat-go/jwx","published_at":"2023-12-04T23:42:53.061Z","modified_at":"2026-09-10T03:49:59.444603Z","products":[],"rating":{"severity":"medium","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","attack_path":"internet_unauthenticated","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.007290000095963478,"percentile":0.5502099990844727,"date":"2026-11-19T00:00:00Z"},"priority":7.3,"details":"lestrrat-go/jwx is a Go module implementing various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. A p2c parameter set too high in JWE's algorithm PBES2-* could lead to a denial of service. The JWE key management algorithms based on PBKDF2 require a JOSE Header Parameter called p2c (PBES2 Count). This parameter dictates the number of PBKDF2 iterations needed to derive a CEK wrapping key. Its primary purpose is to intentionally slow down the key derivation function, making password brute-force and dictionary attacks more resource- intensive. Therefore, if an attacker sets the p2c parameter in JWE to a very large number, it can cause a lot of computational consumption, resulting in a denial of service. This vulnerability has been addressed in commit `64f2a229b` which has been included in release version 1.2.27 and 2.0.18. Users are advised to upgrade. There are no known workarounds for this vulnerability.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"lestrrat-go/jwx","versions":["< 1.2.27",">= 2.0.0, < 2.0.18"],"provider":"cvelistv5","source":"CVE-2023-49290","relation":"self"},{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx","purl":"pkg:golang/github.com/lestrrat-go/jwx","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.27"}]}],"fixed":["1.2.27"],"provider":"osv","source":"GHSA-7f9x-gw85-8grf","relation":"self"},{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx","purl":"pkg:golang/github.com/lestrrat-go/jwx","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.27"}]}],"fixed":["1.2.27"],"provider":"osv","source":"GO-2023-2379","relation":"self"},{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx/v2","purl":"pkg:golang/github.com/lestrrat-go/jwx/v2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.18"}]}],"fixed":["2.0.18"],"provider":"osv","source":"GHSA-7f9x-gw85-8grf","relation":"self"},{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx/v2","purl":"pkg:golang/github.com/lestrrat-go/jwx/v2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.18"}]}],"fixed":["2.0.18"],"provider":"osv","source":"GO-2023-2379","relation":"self"},{"ecosystem":"NVD","package":"lestrrat-go:jwx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.27"}]},{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.0.18"}]}],"fixed":["1.2.27","2.0.18"],"provider":"nvd","source":"CVE-2023-49290","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"OpenShift Service Mesh 2","cpe":"cpe:/a:redhat:service_mesh:2","status":"affected","packages":["openshift-service-mesh/istio-cni-rhel8","openshift-service-mesh/pilot-rhel8","openshift-service-mesh/proxyv2-rhel8"],"package_count":3,"fixed":[],"advisories":[],"note":"Will not fix","provider":"redhat-vex","source":"CVE-2023-49290"},{"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","cpe":"cpe:/a:redhat:openshift_data_foundation:4","status":"not_affected","packages":["odf4/ocs-must-gather-rhel8","odf4/ocs-rhel9-operator","odf4/odf-rhel8-operator"],"package_count":3,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2023-49290"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2023-49290","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2023-49290","license":"CC-BY-4.0","published_at":"2023-12-04T23:42:53.061Z","modified_at":"2025-05-29T13:39:54.272Z","summary":"Malicious parameters can cause a denial of service in lestrrat-go/jwx","details":"lestrrat-go/jwx is a Go module implementing various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. A p2c parameter set too high in JWE's algorithm PBES2-* could lead to a denial of service. The JWE key management algorithms based on PBKDF2 require a JOSE Header Parameter called p2c (PBES2 Count). This parameter dictates the number of PBKDF2 iterations needed to derive a CEK wrapping key. Its primary purpose is to intentionally slow down the key derivation function, making password brute-force and dictionary attacks more resource- intensive. Therefore, if an attacker sets the p2c parameter in JWE to a very large number, it can cause a lot of computational consumption, resulting in a denial of service. This vulnerability has been addressed in commit `64f2a229b` which has been included in release version 1.2.27 and 2.0.18. Users are advised to upgrade. There are no known workarounds for this vulnerability.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"CVE-2023-49290"}],"affected":[{"ecosystem":"CVE","package":"lestrrat-go/jwx","versions":["< 1.2.27",">= 2.0.0, < 2.0.18"],"provider":"cvelistv5","source":"CVE-2023-49290","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/security/advisories/GHSA-7f9x-gw85-8grf"},{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/commit/64f2a229b8e18605f47361d292b526bdc4aee01c"}]},{"provider":"nvd","source_id":"CVE-2023-49290","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49290","severity":[],"affected":[{"ecosystem":"NVD","package":"lestrrat-go:jwx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.27"}]},{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"fixed":"2.0.18"}]}],"fixed":["1.2.27","2.0.18"],"provider":"nvd","source":"CVE-2023-49290","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-7f9x-gw85-8grf","relation":"self","url":"https://osv.dev/vulnerability/GHSA-7f9x-gw85-8grf","license":"CC-BY-4.0","published_at":"2023-12-05T23:29:26Z","modified_at":"2026-09-10T03:49:59.444603Z","summary":"lestrrat-go/jwx's malicious parameters in JWE can cause a DOS","details":"### Summary\ntoo high p2c parameter in JWE's alg PBES2-* could lead to a DOS attack\n\n### Details\nThe JWE key management algorithms based on PBKDF2 require a JOSE Header Parameter called p2c (PBES2 Count). This parameter dictates the number of PBKDF2 iterations needed to derive a CEK wrapping key. Its primary purpose is to intentionally slow down the key derivation function, making password brute-force and dictionary attacks more resource- intensive.\nTherefore, if an attacker sets the p2c parameter in JWE to a very large number, it can cause a lot of computational consumption, resulting in a DOS attack\n\n### PoC\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/lestrrat-go/jwx/v2/jwa\"\n\t\"github.com/lestrrat-go/jwx/v2/jwe\"\n\t\"github.com/lestrrat-go/jwx/v2/jwk\"\n)\n\nfunc main() {\n\ttoken := []byte(\"eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJlbmMiOiJBMjU2R0NNIiwicDJjIjoyMDAwMDAwMDAwLCJwMnMiOiJNNzczSnlmV2xlX2FsSXNrc0NOTU9BIn0=.S8B1kXdIR7BM6i_TaGsgqEOxU-1Sgdakp4mHq7UVhn-_REzOiGz2gg.gU_LfzhBXtQdwYjh.9QUIS-RWkLc.m9TudmzUoCzDhHsGGfzmCA\")\n\tkey, err := jwk.FromRaw([]byte(`abcdefg`))\n\tpayload, err := jwe.Decrypt(token, jwe.WithKey(jwa.PBES2_HS256_A128KW, key))\n\tif err == nil {\n\t\tfmt.Println(string(payload))\n\t}\n}\n\n```\n\n### Impact\nIt's a kind of Dos attack, the user's environment could potentially utilize an excessive amount of CPU resources.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"GHSA-7f9x-gw85-8grf"}],"affected":[{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx","purl":"pkg:golang/github.com/lestrrat-go/jwx","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.27"}]}],"fixed":["1.2.27"],"provider":"osv","source":"GHSA-7f9x-gw85-8grf","relation":"self"},{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx/v2","purl":"pkg:golang/github.com/lestrrat-go/jwx/v2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.18"}]}],"fixed":["2.0.18"],"provider":"osv","source":"GHSA-7f9x-gw85-8grf","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/security/advisories/GHSA-7f9x-gw85-8grf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49290"},{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/commit/64f2a229b8e18605f47361d292b526bdc4aee01c"},{"type":"PACKAGE","url":"https://github.com/lestrrat-go/jwx"}]},{"provider":"osv","source_id":"GO-2023-2379","relation":"self","url":"https://osv.dev/vulnerability/GO-2023-2379","license":"CC-BY-4.0","published_at":"2023-12-11T15:08:59Z","modified_at":"2026-02-04T02:20:17.017357Z","summary":"Denial of service due to malicious parameters in github.com/lestrrat-go/jwx","details":"The JWE key management algorithms based on PBKDF2 require a JOSE Header Parameter called p2c (PBES2 Count). This parameter dictates the number of PBKDF2 iterations needed to derive a CEK wrapping key. Its purpose is to intentionally slow down the key derivation function, making password brute-force and dictionary attacks more resource-intensive. However, if an attacker sets the p2c parameter in JWE to a very large number, it can cause excessive computational consumption.","severity":[],"affected":[{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx","purl":"pkg:golang/github.com/lestrrat-go/jwx","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.27"}]}],"fixed":["1.2.27"],"provider":"osv","source":"GO-2023-2379","relation":"self"},{"ecosystem":"Go","package":"github.com/lestrrat-go/jwx/v2","purl":"pkg:golang/github.com/lestrrat-go/jwx/v2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.18"}]}],"fixed":["2.0.18"],"provider":"osv","source":"GO-2023-2379","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/lestrrat-go/jwx/security/advisories/GHSA-7f9x-gw85-8grf"},{"type":"FIX","url":"https://github.com/lestrrat-go/jwx/commit/64f2a229b8e18605f47361d292b526bdc4aee01c"}]},{"provider":"redhat-vex","source_id":"CVE-2023-49290","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2023-49290","license":"CC-BY-4.0","published_at":"2023-12-05T00:00:00Z","modified_at":"2026-01-27T09:04:04Z","summary":"jwx: Malicious parameters in JWE can cause denial of service","details":"A flaw was found in JWX. This issue occurs when passing crafted input to the JWE key management algorithm, which may result in a denial of service by using an excessive amount of CPU resources.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"CVE-2023-49290"},{"type":"Red Hat","score":"Moderate","source":"CVE-2023-49290"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"OpenShift Service Mesh 2","cpe":"cpe:/a:redhat:service_mesh:2","status":"affected","packages":["openshift-service-mesh/istio-cni-rhel8","openshift-service-mesh/pilot-rhel8","openshift-service-mesh/proxyv2-rhel8"],"package_count":3,"fixed":[],"advisories":[],"note":"Will not fix","provider":"redhat-vex","source":"CVE-2023-49290"},{"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","cpe":"cpe:/a:redhat:openshift_data_foundation:4","status":"not_affected","packages":["odf4/ocs-must-gather-rhel8","odf4/ocs-rhel9-operator","odf4/odf-rhel8-operator"],"package_count":3,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2023-49290"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2023/cve-2023-49290.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2023-49290"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2252905"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2023-49290"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49290"},{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/commit/64f2a229b8e18605f47361d292b526bdc4aee01c"},{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/security/advisories/GHSA-7f9x-gw85-8grf"}]}],"references":[{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/security/advisories/GHSA-7f9x-gw85-8grf"},{"type":"WEB","url":"https://github.com/lestrrat-go/jwx/commit/64f2a229b8e18605f47361d292b526bdc4aee01c"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49290"},{"type":"PACKAGE","url":"https://github.com/lestrrat-go/jwx"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2023/cve-2023-49290.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2023-49290"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2252905"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2023-49290"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2023-49290","url":"https://www.cve.org/CVERecord?id=CVE-2023-49290","license":"CC-BY-4.0","modified_at":"2025-05-29T13:39:54.272Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2023-49290","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49290","relation":"self"},{"provider":"osv","source_id":"GHSA-7f9x-gw85-8grf","url":"https://osv.dev/vulnerability/GHSA-7f9x-gw85-8grf","license":"CC-BY-4.0","modified_at":"2026-09-10T03:49:59.444603Z","relation":"self"},{"provider":"osv","source_id":"GO-2023-2379","url":"https://osv.dev/vulnerability/GO-2023-2379","license":"CC-BY-4.0","modified_at":"2026-02-04T02:20:17.017357Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2023-49290","url":"https://access.redhat.com/security/cve/CVE-2023-49290","license":"CC-BY-4.0","modified_at":"2026-01-27T09:04:04Z","relation":"self"}]}
