CVE-2020-5280
Local file inclusion vulnerability in http4s
http4s before versions 0.18.26, 0.20.20, and 0.21.2 has a local file inclusion vulnerability. This vulnerability applies to all users of org.http4s.server.staticcontent.FileService, org.http4s.server.staticcontent.ResourceService and org.http4s.server.staticcontent.WebjarService. URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. This issue is patched in versions 0.18.26, 0.20.20, and 0.21.2. Note that 0.19.0 is a deprecated release and has never been supported.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.6
Local file inclusion vulnerability in http4s
http4s before versions 0.18.26, 0.20.20, and 0.21.2 has a local file inclusion vulnerability. This vulnerability applies to all users of org.http4s.server.staticcontent.FileService, org.http4s.server.staticcontent.ResourceService and org.http4s.server.staticcontent.WebjarService. URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. This issue is patched in versions 0.18.26, 0.20.20, and 0.21.2. Note that 0.19.0 is a deprecated release and has never been supported.
- Record
CVE-2020-5280- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-23
- Updated
- 2026-11-02
EUVDEUVD-2020-0333
7.6
http4s before versions 0.18.26, 0.20.20, and 0.21.2 has a local file inclusion vulnerability. This vulnerability applies to all users of org.http4s.server.staticcontent.FileService, org.http4s.server.staticcontent.ResourceService and org.http4s.server.staticcontent.WebjarService. URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. This issue is patched in versions 0.18.26, 0.20.20, and 0.21.2. Note that 0.19.0 is a deprecated release and has never been supported.
- Record
EUVD-2020-0333- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-66q9-f7ff-mmx6
7.6
Local file inclusion vulnerability in http4s
Impact
This vulnerability applies to all users of:
org.http4s.server.staticcontent.FileServiceorg.http4s.server.staticcontent.ResourceServiceorg.http4s.server.staticcontent.WebjarService
Path escaping
URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. Specifically:
FileServicemay expose any file on the local file system.ResourceServicemay expose any resource on the class path.
Prefix matching
When the service is configured with a non-empty pathPrefix that doesn't end in a slash, any directories whose names are a prefix of systemPath (from FileService) or pathPrefix (from ResourceService) are exposed. For example, if pathPrefix is /foo and systemPath is /bar, a request to /foobaz/quux.txt exposes file /barbaz/quux.txt, when only files beneath /bar should be available.
URI decoding
URI segments are not decoded before resource resolution. This causes resources with reserved characters in their name to incorrectly return a 404. It also may incorrectly expose the rare resource whose name is URI encoded. This applies to FileService, ResourceService, and WebjarService.
Patches
In all three services, paths with an empty segment, a . segment, or a .. segment are now rejected with a 400 Bad Request response. This fixes exposure outside the configured root. Many clients already eliminate dot segments according to the rules in RFC3986, Section 5.2.4. A middleware that does so at the server level may be considered if there is demand.
If pathInfo is non-empty, and does not begin with /, then a 404 response is generated. This fixes the prefix matching exposure.
All path segments are URI decoded before being passed to the file system or resource path. This allows resolution of resources with reserved characters in the name, and prevents incorrect exposure of resources whose names are themselves URI encoded.
Workarounds
The recommended course is to upgrade:
- v0.18.26, binary compatible with the 0.18.x series
- v0.20.20, binary compatible with the 0.20.x series
- v0.21.2, binary compatible with the 0.21.x series
Note that 0.19.0 is a deprecated release and has never been supported.
If an upgrade is impossible:
- Temporarily copy
FileService.scala,ResourceService.scala, andWebjarService.scalafrom the appropriate release series into your project and recompile with that, changing the package name and reference in your application. - Users of a servlet backend can use the servlet container's file serving capabilities.
Credits
Thank you to Thomas Gøytil for the discovery, responsible disclosure, and assistance testing of this vulnerability.
For more information
If you have any questions or comments about this advisory:
- Open an issue in http4s/http4s
- Email a maintainer:
- Record
GHSA-66q9-f7ff-mmx6- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-23
- Updated
- 2026-11-02
NVD
7.6
http4s before versions 0.18.26, 0.20.20, and 0.21.2 has a local file inclusion vulnerability. This vulnerability applies to all users of org.http4s.server.staticcontent.FileService, org.http4s.server.staticcontent.ResourceService and org.http4s.server.staticcontent.WebjarService. URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. This issue is patched in versions 0.18.26, 0.20.20, and 0.21.2. Note that 0.19.0 is a deprecated release and has never been supported.
- Record
CVE-2020-5280- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-23, CWE-22
- Updated
- 2026-11-02
OSV
7.5
http4s before versions 0.18.26, 0.20.20, and 0.21.2 has a local file inclusion vulnerability. This vulnerability applies to all users of org.http4s.server.staticcontent.FileService, org.http4s.server.staticcontent.ResourceService and org.http4s.server.staticcontent.WebjarService. URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. This issue is patched in versions 0.18.26, 0.20.20, and 0.21.2. Note that 0.19.0 is a deprecated release and has never been supported.
- Record
CVE-2020-5280- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVGHSA-66q9-f7ff-mmx6
7.6
Local file inclusion vulnerability in http4s
Impact
This vulnerability applies to all users of:
org.http4s.server.staticcontent.FileServiceorg.http4s.server.staticcontent.ResourceServiceorg.http4s.server.staticcontent.WebjarService
Path escaping
URI normalization is applied incorrectly. Requests whose path info contain ../ or // can expose resources outside of the configured location. Specifically:
FileServicemay expose any file on the local file system.ResourceServicemay expose any resource on the class path.
Prefix matching
When the service is configured with a non-empty pathPrefix that doesn't end in a slash, any directories whose names are a prefix of systemPath (from FileService) or pathPrefix (from ResourceService) are exposed. For example, if pathPrefix is /foo and systemPath is /bar, a request to /foobaz/quux.txt exposes file /barbaz/quux.txt, when only files beneath /bar should be available.
URI decoding
URI segments are not decoded before resource resolution. This causes resources with reserved characters in their name to incorrectly return a 404. It also may incorrectly expose the rare resource whose name is URI encoded. This applies to FileService, ResourceService, and WebjarService.
Patches
In all three services, paths with an empty segment, a . segment, or a .. segment are now rejected with a 400 Bad Request response. This fixes exposure outside the configured root. Many clients already eliminate dot segments according to the rules in RFC3986, Section 5.2.4. A middleware that does so at the server level may be considered if there is demand.
If pathInfo is non-empty, and does not begin with /, then a 404 response is generated. This fixes the prefix matching exposure.
All path segments are URI decoded before being passed to the file system or resource path. This allows resolution of resources with reserved characters in the name, and prevents incorrect exposure of resources whose names are themselves URI encoded.
Workarounds
The recommended course is to upgrade:
- v0.18.26, binary compatible with the 0.18.x series
- v0.20.20, binary compatible with the 0.20.x series
- v0.21.2, binary compatible with the 0.21.x series
Note that 0.19.0 is a deprecated release and has never been supported.
If an upgrade is impossible:
- Temporarily copy
FileService.scala,ResourceService.scala, andWebjarService.scalafrom the appropriate release series into your project and recompile with that, changing the package name and reference in your application. - Users of a servlet backend can use the servlet container's file serving capabilities.
Credits
Thank you to Thomas Gøytil for the discovery, responsible disclosure, and assistance testing of this vulnerability.
For more information
If you have any questions or comments about this advisory:
- Open an issue in http4s/http4s
- Email a maintainer:
- Record
GHSA-66q9-f7ff-mmx6- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N - Weakness
- CWE-23
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
org.http4s:http4s-server_2.12Maven |
before 0.18.26 | 0.18.26 |
org.http4s:http4s-server_2.12Maven |
0.19.0 up to 0.20.20 | 0.20.20 |
org.http4s:http4s-server_2.12Maven |
0.21.0 up to 0.21.2 | 0.21.2 |
org.http4s:http4s-server_2.12Maven |
before 0.18.26, plus listed versions 0.10.0-M100.15.00.15.0a0.15.10.15.10 Show 45 moreShow less0.15.10a0.15.110.15.11a0.15.120.15.12a0.15.130.15.13a0.15.140.15.14a0.15.150.15.15a0.15.160.15.16a0.15.1a0.15.20.15.2a0.15.30.15.3a0.15.40.15.4a0.15.50.15.5a0.15.60.15.6a0.15.70.15.7a0.15.80.15.8a0.15.90.15.9a0.16.00.16.0-M10.16.0-M20.16.0-M30.16.0-RC10.16.0-RC20.16.0-RC30.16.0a0.16.0a-M10.16.0a-M20.16.0a-M30.16.0a-RC10.16.0a-RC20.16.0a-RC30.16.1 |
0.18.26 |
org.http4s:http4s-server_2.12Maven |
0.19.0 up to 0.20.20, plus listed versions 0.20.00.20.0-M10.20.0-M20.20.0-M30.20.0-M4 Show 23 moreShow less0.20.0-M50.20.0-M60.20.0-M70.20.0-RC10.20.10.20.100.20.110.20.120.20.130.20.140.20.150.20.160.20.170.20.180.20.190.20.20.20.30.20.40.20.50.20.60.20.70.20.80.20.9 |
0.20.20 |
org.http4s:http4s-server_2.12Maven |
0.21.0 up to 0.21.2, plus listed versions 0.21.1 |
0.21.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2020-5280 is a high vulnerability (CVSS 7.6) in Http4s, published March 25, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.98%, the 94th percentile. Fixed in org.http4s:http4s-server_2.12 0.18.26.
References
github.com/http4s/http4s/security/advisories/GHSA-66q9-f7ff-mmx6
github.com/http4s/http4s/commit/250afddbb2e65b70ca9ddaec9d1eb3aaa56de7ec
github.com/http4s/http4s/commit/752b3f63a05a31d2de4f8706877aa08d6b89efca
github.com/http4s/http4s/commit/b87f31b2292dabe667bec3b04ce66176c8a3e17b
nvd.nist.gov/vuln/detail/CVE-2020-5280
github.com/advisories/GHSA-66q9-f7ff-mmx6
Left out here: 59 versions. The JSON record has them.