Vulnerability · Published Sep 1, 2021 · Assigned by GitHub_M
CVE-2021-39185Default CORS config allows any origin with credentials
Critical 9.1
In plain English
A critical-severity security flaw in http4s from http4s. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 49% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.http4s:http4s-server_2.10 | no fix listed | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.11 | no fix listed | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.12 | 0.21.27 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.12 | 0.23.2 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.12 | 0.22.3 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.13 | 0.23.2 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.13 | 0.21.27 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.13 | 0.22.3 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_2.13.0-M5 | no fix listed | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_3 | 0.23.2 | GHSA-52cf-226f-rhr6 |
| Maven | org.http4s:http4s-server_3 | 0.22.3 | GHSA-52cf-226f-rhr6 |
Affected products (as reported)
Weakness: CWE-346 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
References
- https://github.com/http4s/http4s/security/advisories/GHSA-52cf-226f-rhr6 x_refsource_CONFIRM
- https://github.com/http4s/http4s/releases/tag/v0.23.2 x_refsource_MISC