{"id":"CVE-2021-39185","published":"2021-09-01T19:25:09Z","modified":"2024-08-04T01:58:18Z","title":"Default CORS config allows any origin with credentials","vendor":"http4s","product":"http4s","tier":"tail","description":{"text":"Http4s is a minimal, idiomatic Scala interface for HTTP services. In http4s versions 0.21.26 and prior, 0.22.0 through 0.22.2, 0.23.0, 0.23.1, and 1.0.0-M1 through 1.0.0-M24, the default CORS configuration is vulnerable to an origin reflection attack. The middleware is also susceptible to a Null Origin Attack. The problem is fixed in 0.21.27, 0.22.3, 0.23.2, and 1.0.0-M25. The original `CORS` implementation and `CORSConfig` are deprecated. See the GitHub GHSA for more information, including code examples and workarounds.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00594,"percentile":0.42397,"provenance":"source"},"cwes":[{"id":"CWE-346","name":"Origin Validation Error"}],"references":[{"url":"https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/http4s/http4s/releases/tag/v0.23.2","tags":["x_refsource_MISC"]}],"priority":{"score":14.8,"factors":[{"name":"EPSS percentile","points":8.48},{"name":"CVSS severity","points":6.37}]},"vendorSlug":"http4s","affectedVersions":[{"vendor":"http4s","product":"http4s","versions":["< 0.21.27",">= 0.22.0, < 0.22.3",">= 0.23.0, < 0.23.2",">= 1.0.0-M1, <= 1.0.0-M24"]}],"affected":[{"ecosystem":"Maven","package":"org.http4s:http4s-server_2.13.0-M5","vulnerableRanges":["<0.21.27"],"patched":[],"from":["GHSA-52cf-226f-rhr6"],"provenance":"source"},{"ecosystem":"Maven","package":"org.http4s:http4s-server_3","vulnerableRanges":[">=0.22.0, <0.22.3",">=0.23.0, <0.23.2"],"patched":["0.22.3","0.23.2"],"from":["GHSA-52cf-226f-rhr6"],"provenance":"source"},{"ecosystem":"Maven","package":"org.http4s:http4s-server_2.10","vulnerableRanges":["<0.21.27"],"patched":[],"from":["GHSA-52cf-226f-rhr6"],"provenance":"source"},{"ecosystem":"Maven","package":"org.http4s:http4s-server_2.11","vulnerableRanges":["<0.21.27"],"patched":[],"from":["GHSA-52cf-226f-rhr6"],"provenance":"source"},{"ecosystem":"Maven","package":"org.http4s:http4s-server_2.12","vulnerableRanges":["<0.21.27",">=0.22.0, <0.22.3",">=0.23.0, <0.23.2"],"patched":["0.21.27","0.22.3","0.23.2"],"from":["GHSA-52cf-226f-rhr6"],"provenance":"source"},{"ecosystem":"Maven","package":"org.http4s:http4s-server_2.13","vulnerableRanges":["<0.21.27",">=0.22.0, <0.22.3",">=0.23.0, <0.23.2"],"patched":["0.21.27","0.22.3","0.23.2"],"from":["GHSA-52cf-226f-rhr6"],"provenance":"source"}],"summary":{"text":"The default CORS configuration in http4s (versions 0.21.26 and earlier, 0.22.0–0.22.2, 0.23.0–0.23.1, and 1.0.0-M1 through 1.0.0-M24) reflects arbitrary request origins and does not properly validate them, and the middleware is also susceptible to a null-origin bypass. An attacker who can get a victim to send a cross-origin request over the network, without needing authentication, can read responses that should be restricted to trusted origins, including those carrying credentials.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:03:16Z"},"euvd":{"id":"EUVD-2021-1978","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2020-5280","published":"2020-03-25","fixed":"0.21.2","kev":false,"link":{"from":"CVE-2020-5280","to":"CVE-2021-39185","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.http4s:http4s-server_2.12","fromFixed":"0.21.2","toFixed":"0.21.27","daysApart":525}]}},{"cve":"CVE-2021-39185","published":"2021-09-01","fixed":"0.23.2","kev":false},{"cve":"CVE-2021-41084","published":"2021-09-21","fixed":"0.23.4","kev":false,"link":{"from":"CVE-2021-39185","to":"CVE-2021-41084","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.http4s:http4s-server_2.12","fromFixed":"0.23.2","toFixed":"0.23.4","daysApart":20},{"kind":"version-step","provenance":"source","package":"Maven:org.http4s:http4s-server_2.12","fromFixed":"0.21.27","toFixed":"0.21.29","daysApart":20}]}},{"cve":"CVE-2026-69201","published":"2026-09-15","fixed":"0.23.35","kev":false}],"package":"Maven:org.http4s:http4s-server_2.12"}}