{"answers":{"affected":"8 open source packages ship an affected version, including org.http4s:http4s-core. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32643 in the wild and no public exploit code.","fix":"Upgrade org.http4s:http4s-core to a fixed version for your release line: 0.21.24, 0.22.0-RC1, 0.23.0-RC1 or 1.0.0-M23.","what":"CVE-2021-32643 is a medium-severity vulnerability in http4s, published on 27 May 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-32643 and fix it if it is affected.\n\nWhat it is: CVE-2021-32643 is a medium-severity vulnerability in http4s, published on 27 May 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-32643 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.http4s:http4s-core (Maven): affected from 0.21.7; fixed in 0.21.24\n- org.http4s:http4s-core (Maven): affected from 0.21.7; fixed in 0.21.24\n- org.http4s:http4s-core (Maven): affected from 0.22.0-M1; fixed in 0.22.0-RC1\n- org.http4s:http4s-core (Maven): affected from 0.22.0-M1; fixed in 0.22.0-RC1\n- org.http4s:http4s-core (Maven): affected from 0.23.0-M1; fixed in 0.23.0-RC1\n- org.http4s:http4s-core (Maven): affected from 0.23.0-M1; fixed in 0.23.0-RC1\n- org.http4s:http4s-core (Maven): affected from 1.0.0-M1; fixed in 1.0.0-M23\n- org.http4s:http4s-core (Maven): affected from 1.0.0-M1; fixed in 1.0.0-M23\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-32643/ (Markdown: https://insights.sbomify.com/CVE-2021-32643/index.md)","id":"CVE-2021-32643","markdown":"https://insights.sbomify.com/CVE-2021-32643/index.md","name":"CVE-2021-32643","record":{"aliases":["GHSA-6h7w-fc84-x7p6"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Scala HTTP library","requires_auth":"none","summary":"Attackers can infer the existence of server directories via StaticFile.fromUrl, leaking internal filesystem structure information.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"http4s","vendor":"typelevel"}],"cvss":{"score":5.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Http4s is a Scala interface for HTTP services. `StaticFile.fromUrl` can leak the presence of a directory on a server when the `URL` scheme is not `file://`, and the URL points to a fetchable resource under its scheme and authority. The function returns `F[None]`, indicating no resource, if `url.getFile` is a directory, without first checking the scheme or authority of the URL. If a URL connection to the scheme and URL would return a stream, and the path in the URL exists as a directory on the server, the presence of the directory on the server could be inferred from the 404 response. The contents and other metadata about the directory are not exposed. This affects http4s versions: 0.21.7 through 0.21.23, 0.22.0-M1 through 0.22.0-M8, 0.23.0-M1, and 1.0.0-M1 through 1.0.0-M22. The [patch](https://github.com/http4s/http4s/commit/52e1890665410b4385e37b96bc49c5e3c708e4e9) is available in the following versions: v0.21.24, v0.22.0-M9, v0.23.0-M2, v1.0.0-M23. As a workaround users can avoid calling `StaticFile.fromUrl` with non-file URLs.","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":"StaticFile.fromUrl can leak presence of a directory","id":"CVE-2021-32643","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"information_disclosure","year":"2021"},"n_packages":8,"n_references":3,"next":{"headline":"Cross-site Scripting in Random.php","id":"CVE-2021-32644"},"packages":[{"ecosystem":"Maven","fixed":["0.21.24"],"introduced":["0.21.7"],"last_affected":[],"package":"org.http4s:http4s-core","purl":null,"source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["0.21.24"],"introduced":["0.21.7"],"last_affected":[],"package":"org.http4s:http4s-core","purl":"pkg:maven/org.http4s/http4s-core","source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["0.22.0-RC1"],"introduced":["0.22.0-M1"],"last_affected":[],"package":"org.http4s:http4s-core","purl":null,"source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["0.22.0-RC1"],"introduced":["0.22.0-M1"],"last_affected":[],"package":"org.http4s:http4s-core","purl":"pkg:maven/org.http4s/http4s-core","source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["0.23.0-RC1"],"introduced":["0.23.0-M1"],"last_affected":[],"package":"org.http4s:http4s-core","purl":null,"source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["0.23.0-RC1"],"introduced":["0.23.0-M1"],"last_affected":[],"package":"org.http4s:http4s-core","purl":"pkg:maven/org.http4s/http4s-core","source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["1.0.0-M23"],"introduced":["1.0.0-M1"],"last_affected":[],"package":"org.http4s:http4s-core","purl":null,"source":"GHSA-6h7w-fc84-x7p6"},{"ecosystem":"Maven","fixed":["1.0.0-M23"],"introduced":["1.0.0-M1"],"last_affected":[],"package":"org.http4s:http4s-core","purl":"pkg:maven/org.http4s/http4s-core","source":"GHSA-6h7w-fc84-x7p6"}],"prev":{"headline":"Missing input validation in dynamic discovery example scripts.","id":"CVE-2021-32642"},"products":["http4s"],"published":"2021-05-27","related":[{"cvss_score":9.1,"headline":"Default CORS config allows any origin with credentials","id":"CVE-2021-39185","kev_date_added":null,"published":"2021-09-01"},{"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"}],"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-03","vendors":["http4s"]},"summary":"Attackers can infer the existence of server directories via StaticFile.fromUrl, leaking internal filesystem structure information.","url":"https://insights.sbomify.com/CVE-2021-32643/"}