CVEfocus › CVE database › CVE-2021-39185

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

CVSS 9.1 CriticalEPSS 0.6% (higher than 42% of CVEs)Published 2021-09-01Updated 2024-08-04Assigner: GitHub_M

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.

CWE-346

What to do

Fixed builds are available from Maven: see the table below for the fixed version per release.

Maven has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
3Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Maven libraryorg.http4s:http4s-server_2.10Fix pendingGHSA-52cf-226f-rhr6
Maven libraryorg.http4s:http4s-server_2.11Fix pendingGHSA-52cf-226f-rhr6
Maven libraryorg.http4s:http4s-server_2.12Fixed0.22.3GHSA-52cf-226f-rhr6
Maven libraryorg.http4s:http4s-server_2.13Fixed0.22.3GHSA-52cf-226f-rhr6
Maven libraryorg.http4s:http4s-server_2.13.0-m5Fix pendingGHSA-52cf-226f-rhr6
Maven libraryorg.http4s:http4s-server_3Fixed0.22.3GHSA-52cf-226f-rhr6

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.