{"answers":{"affected":"22 open source packages ship an affected version, including org.http4s:http4s-server_2.12, org.http4s:http4s-server_2.10 and org.http4s:http4s-server_2.11. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-39185 in the wild and no public exploit code.","fix":"Upgrade org.http4s:http4s-server_2.12 to a fixed version for your release line: 0.21.27, 0.22.3 or 0.23.2.","what":"CVE-2021-39185 is a critical vulnerability in http4s, published on 1 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-39185 and fix it if it is affected.\n\nWhat it is: CVE-2021-39185 is a critical vulnerability in http4s, published on 1 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-39185 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.http4s:http4s-server_2.12 (Maven): affected all versions; fixed in 0.21.27\n- org.http4s:http4s-server_2.12 (Maven): affected all versions; fixed in 0.21.27\n- org.http4s:http4s-server_2.12 (Maven): affected from 0.22.0; fixed in 0.22.3\n- org.http4s:http4s-server_2.12 (Maven): affected from 0.22.0; fixed in 0.22.3\n- org.http4s:http4s-server_2.12 (Maven): affected from 0.23.0; fixed in 0.23.2\n- org.http4s:http4s-server_2.12 (Maven): affected from 0.23.0; fixed in 0.23.2\n- org.http4s:http4s-server_2.10 (Maven): affected all versions; no fix listed\n- org.http4s:http4s-server_2.10 (Maven): affected all versions; no fix listed\n- org.http4s:http4s-server_2.11 (Maven): affected all versions; no fix listed\n- org.http4s:http4s-server_2.11 (Maven): affected all versions; no fix listed\n- org.http4s:http4s-server_2.13 (Maven): affected all versions; fixed in 0.21.27\n- org.http4s:http4s-server_2.13 (Maven): affected all versions; fixed in 0.21.27\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-39185/ (Markdown: https://insights.sbomify.com/CVE-2021-39185/index.md)","id":"CVE-2021-39185","markdown":"https://insights.sbomify.com/CVE-2021-39185/index.md","name":"CVE-2021-39185","record":{"aliases":["GHSA-52cf-226f-rhr6"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Scala HTTP library","requires_auth":"none","summary":"Default CORS configuration in Http4s allows origin reflection and null origin attacks, enabling cross-origin data access.","user_interaction":"not_required","vuln_class":"misconfiguration"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"http4s","vendor":"typelevel"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-346","name":"Origin Validation Error"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Default CORS config allows any origin with credentials","id":"CVE-2021-39185","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"misconfiguration","year":"2021"},"n_packages":22,"n_references":2,"next":{"headline":"Improper Input Validation in GlobalNewFiles","id":"CVE-2021-39186"},"packages":[{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.10","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.10","purl":"pkg:maven/org.http4s/http4s-server_2.10","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.11","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.11","purl":"pkg:maven/org.http4s/http4s-server_2.11","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.21.27"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.12","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.21.27"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.12","purl":"pkg:maven/org.http4s/http4s-server_2.12","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.22.3"],"introduced":["0.22.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.12","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.22.3"],"introduced":["0.22.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.12","purl":"pkg:maven/org.http4s/http4s-server_2.12","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.23.2"],"introduced":["0.23.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.12","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.23.2"],"introduced":["0.23.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.12","purl":"pkg:maven/org.http4s/http4s-server_2.12","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.21.27"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.21.27"],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13","purl":"pkg:maven/org.http4s/http4s-server_2.13","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.22.3"],"introduced":["0.22.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.22.3"],"introduced":["0.22.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13","purl":"pkg:maven/org.http4s/http4s-server_2.13","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.23.2"],"introduced":["0.23.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.23.2"],"introduced":["0.23.0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13","purl":"pkg:maven/org.http4s/http4s-server_2.13","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13.0-M5","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":[],"package":"org.http4s:http4s-server_2.13.0-M5","purl":"pkg:maven/org.http4s/http4s-server_2.13.0-M5","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.22.3"],"introduced":["0.22.0"],"last_affected":[],"package":"org.http4s:http4s-server_3","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.22.3"],"introduced":["0.22.0"],"last_affected":[],"package":"org.http4s:http4s-server_3","purl":"pkg:maven/org.http4s/http4s-server_3","source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.23.2"],"introduced":["0.23.0"],"last_affected":[],"package":"org.http4s:http4s-server_3","purl":null,"source":"GHSA-52cf-226f-rhr6"},{"ecosystem":"Maven","fixed":["0.23.2"],"introduced":["0.23.0"],"last_affected":[],"package":"org.http4s:http4s-server_3","purl":"pkg:maven/org.http4s/http4s-server_3","source":"GHSA-52cf-226f-rhr6"}],"prev":{"headline":"Sandboxed renderers can obtain thumbnails of arbitrary files through the nativeImage API","id":"CVE-2021-39184"},"products":["http4s"],"published":"2021-09-01","related":[{"cvss_score":8.7,"headline":"Response Splitting from unsanitized headers in http4s","id":"CVE-2021-41084","kev_date_added":null,"published":"2021-09-21"},{"cvss_score":7.6,"headline":"Local file inclusion vulnerability in http4s","id":"CVE-2020-5280","kev_date_added":null,"published":"2020-03-25"},{"cvss_score":7.5,"headline":"Http4s has fatal error parsing User-Agent and Server headers","id":"CVE-2023-22465","kev_date_added":null,"published":"2023-01-04"},{"cvss_score":7.5,"headline":"Unbounded connection acceptance in http4s-blaze-server","id":"CVE-2021-21294","kev_date_added":null,"published":"2021-02-02"},{"cvss_score":6.3,"headline":"Http4s vulnerable to HTTP Request Smuggling due to improper handling of HTTP trailer section","id":"CVE-2025-59822","kev_date_added":null,"published":"2025-09-23"},{"cvss_score":5.8,"headline":"StaticFile.fromUrl can leak presence of a directory","id":"CVE-2021-32643","kev_date_added":null,"published":"2021-05-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["http4s"]},"summary":"Default CORS configuration in Http4s allows origin reflection and null origin attacks, enabling cross-origin data access.","url":"https://insights.sbomify.com/CVE-2021-39185/"}