{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-39185","id":"CVE-2021-39185","title":"Default CORS config allows any origin with credentials","description":"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` impl","descriptionLong":"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.","published":"2021-09-01T19:25:09.000Z","updated":"2026-10-20T10:54:53.199576583Z","reserved":"2021-08-16T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"github.com"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"OSV"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"GitHub"},{"version":"2.0","score":6.4,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"critical","products":["http4s"],"affectedProducts":[{"vendor":"http4s","product":"http4s","defaultStatus":null,"versions":[{"status":"affected","version":"< 0.21.27"},{"status":"affected","version":">= 0.22.0, < 0.22.3"},{"status":"affected","version":">= 0.23.0, < 0.23.2"},{"status":"affected","version":">= 1.0.0-M1, <= 1.0.0-M24"}],"platforms":[]}],"packages":[{"ecosystem":"Maven","name":"org.http4s:http4s-server_2.13.0-M5","purl":"pkg:maven/org.http4s/http4s-server_2.13.0-M5","ranges":["all versions"],"fixed":[],"advisory":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","name":"org.http4s:http4s-server_3","purl":"pkg:maven/org.http4s/http4s-server_3","ranges":[">=0.22.0 <0.22.3",">=0.23.0 <0.23.2"],"fixed":["0.22.3","0.23.2"],"advisory":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","name":"org.http4s:http4s-server_2.10","purl":"pkg:maven/org.http4s/http4s-server_2.10","ranges":["all versions"],"fixed":[],"advisory":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","name":"org.http4s:http4s-server_2.11","purl":"pkg:maven/org.http4s/http4s-server_2.11","ranges":["all versions"],"fixed":[],"advisory":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","name":"org.http4s:http4s-server_2.12","purl":"pkg:maven/org.http4s/http4s-server_2.12","ranges":["<0.21.27",">=0.22.0 <0.22.3",">=0.23.0 <0.23.2"],"fixed":["0.21.27","0.22.3","0.23.2"],"advisory":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","name":"org.http4s:http4s-server_2.13","purl":"pkg:maven/org.http4s/http4s-server_2.13","ranges":["<0.21.27",">=0.22.0 <0.22.3",">=0.23.0 <0.23.2"],"fixed":["0.21.27","0.22.3","0.23.2"],"advisory":"GHSA-52cf-226f-rhr6"}],"cwes":["CWE-346"],"aliases":["GHSA-52cf-226f-rhr6"],"references":[{"url":"https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/http4s/http4s/releases/tag/v0.23.2","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39185","tags":["advisory"]},{"url":"https://github.com/http4s/http4s","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00594,"epssPercentile":0.49184,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-39185","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39185","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-39185","ok":true,"note":"6 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-52cf-226f-rhr6","ok":true,"note":"GHSA-52cf-226f-rhr6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-39185","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}