What’s Vulnerable › Vulnerabilities
CVE-2020-5280: Local file inclusion vulnerability in http4s
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 7.0% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2020-03-25 · updated 2026-06-17
- Weakness: CWE-23
Description
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.
Affected products
- http4s: before 0.18.26; from 0.19.0 before 0.20.20; from 0.21.0 before 0.21.2 — fixed in 0.18.26, 0.20.20, 0.21.2
How to fix
Upgrade to a fixed version: http4s 0.18.26, 0.20.20, 0.21.2. Check the vendor advisory for mitigations.
References
- https://github.com/http4s/http4s/commit/250afddbb2e65b70ca9ddaec9d1eb3aaa56de7ec
- https://github.com/http4s/http4s/commit/752b3f63a05a31d2de4f8706877aa08d6b89efca
- https://github.com/http4s/http4s/commit/b87f31b2292dabe667bec3b04ce66176c8a3e17b
- https://github.com/http4s/http4s/security/advisories/GHSA-66q9-f7ff-mmx6
- https://github.com/http4s/http4s/commit/250afddbb2e65b70ca9ddaec9d1eb3aaa56de7ec
- https://github.com/http4s/http4s/commit/752b3f63a05a31d2de4f8706877aa08d6b89efca
- https://github.com/http4s/http4s/commit/b87f31b2292dabe667bec3b04ce66176c8a3e17b
- https://github.com/http4s/http4s/security/advisories/GHSA-66q9-f7ff-mmx6
Get alerted when CVE-2020-5280 or the next vulnerability affects your stack