CVE-2021-39185

Default CORS config allows any origin with credentials

CRITICAL
9.1
CVSS Score
Published: September 1, 2021 at 07:25 PM UTC
Updated: June 17, 2026 at 04:03 AM UTC
2 products affected across 2 vendorsHTTP4SHTTP4S

Using http4s by http4s?

Get instant alerts when new vulnerabilities affect http4s - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
CRITICAL9.1
Exploit prediction
EPSS 0.6%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≤ 1.0.0-M24v < 0.21.27v < 0.22.3v < 0.23.2
Affected range stops below 0.21.27, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.22.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.23.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

CVSS

9.1CRITICALGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-346

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card