# CVE-2021-39185: Default CORS config allows any origin with credentials

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Published: 2021-09-01T19:25:09.000Z
- Modified: 2026-07-08T06:28:14.835Z
- Also known as: GHSA-52cf-226f-rhr6
- Weaknesses: CWE-346
- Assigned by: GitHub_M

## 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` implementation and `CORSConfig` are deprecated. See the GitHub GHSA for more information, including code examples and workarounds.

(As written by CVE List.)

## Affected

- http4s http4s: < 0.21.27; >= 0.22.0, < 0.22.3; >= 0.23.0, < 0.23.2; >= 1.0.0-M1, <= 1.0.0-M24
- org.http4s:http4s-server_2.13.0-M5 (Maven): all versions
- org.http4s:http4s-server_3 (Maven): from 0.22.0 before 0.22.3; from 0.23.0 before 0.23.2
- org.http4s:http4s-server_2.10 (Maven): all versions
- org.http4s:http4s-server_2.11 (Maven): all versions
- org.http4s:http4s-server_2.12 (Maven): before 0.21.27; from 0.22.0 before 0.22.3; from 0.23.0 before 0.23.2
- org.http4s:http4s-server_2.13 (Maven): before 0.21.27; from 0.22.0 before 0.22.3; from 0.23.0 before 0.23.2
- typelevel http4s: up to 0.21.26; from 0.22.0 up to 0.22.2; 0.23.0; 0.23.1; 1.0.0

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:2.0 6.4 Medium `AV:N/AC:L/Au:N/C:P/I:P/A:N`

## References

- <https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6> (patch, third-party-advisory, web)
- <https://github.com/http4s/http4s/releases/tag/v0.23.2> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-39185> (advisory)
- <https://github.com/http4s/http4s> (package)

## Sources

- CVE List: [CVE-2021-39185](https://www.cve.org/CVERecord?id=CVE-2021-39185), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-52cf-226f-rhr6](https://github.com/advisories/GHSA-52cf-226f-rhr6), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-39185](https://nvd.nist.gov/vuln/detail/CVE-2021-39185), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-39185 · Whole record: https://cve.day/CVE-2021-39185.json · Rebuilt by cve.day 2026-11-25T22:58:03.619Z
