Categories
CVE-2021-32643

Path Traversal in org.http4s:http4s-core (CVE-2021-32643)

Summary

Path traversal in org.http4s:http4s-core (CVE-2021-32643). Risk of unauthorized operations or information disclosure. Exploitable via StaticFile.fromUrl. Mitigation: upgrade to 1.0.0-M23 or later.

Original description

The description as published by the source.

Impact

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
  • 1.0.0-M1 through 1.0.0-M22

Patches

The patch is available in the following versions:

  • v0.21.24
  • v0.22.0-RC1
  • v0.23.0-RC1
  • v1.0.0-M23

Note: a previous version of this advisory incorrectly referred to 0.22.0-M9 and 0.23.0-M2.

Workarounds

Don't call StaticFile.fromUrl with non-file URLs.

For more information

If you have any questions or comments about this advisory:

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2021-32643 has been found in org.http4s:http4s-core.
Attackers can target a specific entry point like StaticFile.fromUrl over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade org.http4s:http4s-core to 1.0.0-M23 or later.
If unsure, ask your IT team or search "org.http4s:http4s-core CVE-2021-32643" on the vendor's site.

CVE-2021-32643 (org.http4s:http4s-core) — CWE-22
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: StaticFile.fromUrl / URL / url.getFile
Patched: 1.0.0-M23 — apply immediately
Workaround: Don't call StaticFile.fromUrl with non-file URLs.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Path traversal (CWE-22) exists in org.http4s:http4s-core. Attackers reach the vulnerable code path via StaticFile.fromUrl without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of org.http4s:http4s-core. Attack surface: StaticFile.fromUrl / URL / url.getFile.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 1.0.0-M23.

🛡️ Workaround

Workaround: Don't call StaticFile.fromUrl with non-file URLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    Audit SBOM/dependencies for affected components.

    資産台帳・SBOM・依存マニフェストで org.http4s:http4s-core を使っているサービスとバージョンを洗い出す。

  2. 2
    Apply temporary workaround mitigate
    Don't call `StaticFile.fromUrl` with non-file URLs.

    パッチが適用されるまでの応急処置として、Don't call StaticFile.fromUrl with non-file URLs. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade org.http4s:http4s-core to 1.0.0-M23

    ステージング環境で 1.0.0-M23 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

Maven org.http4s:http4s-core
[{"type":"ECOSYSTEM","events":[{"introduced":"1.0.0-M1"},{"fixed":"1.0.0-M23"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details