Vulnerability · Published Jul 20, 2020 · Assigned by GitHub_M
CVE-2020-15111CRLF vulnerability in Fiber
Medium 4.2
In plain English
A medium-severity injection in fiber from gofiber. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 59% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In Fiber before version 1.12.6, the filename that is given in c.Attachment() (https://docs.gofiber.io/ctx#attachment) is not escaped, and therefore vulnerable for a CRLF injection attack. I.e. an attacker could upload a custom filename and then give the link to the victim. With this filename, the attacker can change the name of the downloaded file, redirect to another site, change the authorization header, etc. A possible workaround is to serialize the input before passing it to ctx.Attachment().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/gofiber/fiber | 1.12.6 | GHSA-9cx9-x2gp-9qvh |
| Go | github.com/gofiber/fiber | 1.12.6 | GO-2021-0108 |
Affected products (as reported)
Weakness: CWE-74, CWE-93 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N