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

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-01 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-39185 is rated Moderate Risk (49.9/100): CVSS Critical severity, with low exploitation likelihood (EPSS 0.17%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-39185

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-11-21 0.14% 0.17% +0.03%
2 2025-11-18 0.17% 0.14% -0.03%
3 2025-09-12 0.17%

Full EPSS history (10 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-39185

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.1 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 5.2 [email protected]
6.4 2.0 MEDIUM
AV:N/AC:L/Au:N/C:P/I:P/A:N Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:N)
No availability impact.
10.0 4.9 [email protected]

Weakness enumeration for CVE-2021-39185

GitHub Security Advisory for CVE-2021-39185

GHSA-52cf-226f-rhr6 · Severity: critical · Ecosystem: maven — Default CORS config allows any origin with credentials

Affected software / configurations for CVE-2021-39185

Vendor Product Version Raw CPE
typelevel http4s <= 0.21.26 cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:*
typelevel http4s >= 0.22.0, <= 0.22.2 cpe:2.3:a:typelevel:http4s:*:*:*:*:*:*:*:*
typelevel http4s 0.23.0 cpe:2.3:a:typelevel:http4s:0.23.0:*:*:*:*:*:*:*
typelevel http4s 0.23.1 cpe:2.3:a:typelevel:http4s:0.23.1:*:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone1:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone10:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone11:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone12:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone13:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone14:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone15:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone16:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone17:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone18:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone19:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone2:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone20:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone21:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone22:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone23:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone24:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone3:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone4:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone5:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone6:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone7:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone8:*:*:*:*:*:*
typelevel http4s 1.0.0 cpe:2.3:a:typelevel:http4s:1.0.0:milestone9:*:*:*:*:*:*

References for CVE-2021-39185

cvelogic Threat Intelligence