LiveActive security incident?Get immediate response
CVE Record

CVE-2021-32643: StaticFile.fromUrl can leak presence of a directory

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.

MediumCVSS 5.8Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-32643 lets an affected http4s service reveal whether certain server-side directories exist when StaticFile.fromUrl is used with non-file URLs. It does not expose directory contents or metadata, but it can aid reconnaissance against applications using the vulnerable helper.

Executive priority

Treat this as a moderate dependency hygiene issue, not an emergency. Prioritize remediation where public-facing services use affected http4s static-file behavior, especially if URL inputs are influenced by requests or configuration.

Technical view

In affected http4s versions, StaticFile.fromUrl checks url.getFile as a directory before validating URL scheme or authority. For fetchable non-file URLs, differing 404 behavior can disclose directory presence. Affected ranges include 0.21.7-0.21.23, 0.22.0-M1-M8, 0.23.0-M1, and 1.0.0-M1-M22.

Likely exposure

Exposure is limited to Scala services using affected http4s versions and calling StaticFile.fromUrl with non-file URLs. Services not using this helper, or using only file:// URLs, are less likely exposed based on the provided advisory.

Exploitation context

The CVSS vector is network-accessible with low complexity, no privileges, and no user interaction. The provided sources and KEV flag do not support active exploitation. Impact is limited to low confidentiality loss through directory-existence inference.

Researcher notes

The advisory states contents and other directory metadata are not exposed. Validation should focus on dependency versioning and reachable StaticFile.fromUrl call paths. Do not assume broader path traversal impact without separate evidence.

Mitigation direction

  • Upgrade to http4s v0.21.24, v0.22.0-M9, v0.23.0-M2, v1.0.0-M23, or later fixed releases.
  • If upgrade is delayed, avoid StaticFile.fromUrl with non-file URLs.
  • Review static file code for non-file URL inputs to StaticFile.fromUrl.
  • Check the http4s advisory and release notes before production rollout.

Validation and detection

  • Inventory org.http4s dependencies and compare versions against the affected ranges.
  • Search application code for StaticFile.fromUrl usage.
  • Confirm any StaticFile.fromUrl inputs are file:// URLs or removed.
  • Verify deployed artifacts use a fixed http4s version.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-32643 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.8CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N3.91.4Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.8Medium
CVSS 3.1 vector shape for CVE-2021-32643Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
http4shttp4s>= 0.21.7, < 0.21.24, >= 0.22.0-M1, <= 0.22.0-M8, = 0.23.0-M1, >= 1.0.0-M1, < 1.0.0-M23Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-22 · source CWE mapping

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.