Http4s: ResourceService and Webjar Service path escape via percent-encoded separators
http4s
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-server_2.12 Maven |
|
|
| org.http4s:http4s-server_2.13 Maven |
|
|
http4s
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-server_2.12 Maven |
|
|
| org.http4s:http4s-server_2.13 Maven |
|
|
| org.http4s:http4s-server_3 Maven |
|
|
Http4s is a Scala interface for HTTP services. Prior to 0.23.35 and 1.0.0-M47, ResourceService and WebjarService decode each URL path segment but reject only segments exactly equal to an empty string, a dot, or two dots. A request containing percent-encoded slash or backslash separators can turn an accepted segment into a parent-directory traversal after decoding, allowing access to classpath or WebJar resources outside the configured base when a directory-backed classpath is served and the backend preserves the encoded separator. The patch rejects decoded segments containing slash or backslash in ResourceService and WebjarService, and applies the same guard to the non-exploitable FileService for consistency. This issue is fixed in versions 0.23.35 and 1.0.0-M47.
From the CVE record · GitHub_M
ResourceService and WebjarService can accept URL path segments containing percent-encoded slashes or backslashes that become parent-directory traversal after decoding. A remote requester can access classpath or WebJar resources outside the configured base when a directory-backed classpath is served and the backend preserves the encoded separator. The input does not specify an authentication or user-interaction requirement.
Teams running Maven org.http4s:http4s-server_2.12 below 0.23.35, or http4s-server_2.13 or http4s-server_3 below 0.23.35 or from 1.0.0-M1 through versions before 1.0.0-M47, should check their deployments.