Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

CRLF vulnerability in Fiber

CVSS 3.1 4.2 MEDIUMEUVD CVSS 3.1 4.2 CVSS 3.1 · [email protected] · Secondary 4.2 MEDIUMCVSS 3.1 · [email protected] · Primary 5.4 MEDIUMCVSS 2.0 · [email protected] · Primary 5.8 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by github.com/gofiber/fiber 1.12.6osv · severity unknownFixed by github.com/gofiber/fiber 1.12.6KEV status unknown

cve-program · CVE-2020-15111

Published

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().

Read the publisher's advisory

euvd · EUVD-2021-1299

Published

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().

Read the publisher's advisory

nvd · CVE-2020-15111

Published

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().

Read the publisher's advisory

osv · GHSA-9cx9-x2gp-9qvh

Published

### Impact 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. ### Steps to reproduce ```go package main import "github.com/gofiber/fiber" const badFileName = "another secret document.pdf\"\r\nLocation: google.com\r\nAuthorization: \"example_of_session_fixation" func splitTheResponse(c *fiber.Ctx) { c.Attachment(badFileName) } func main() { app := fiber.New() app.Get("/attack", splitTheResponse) app.Listen("127.0.0.1:8080") } ``` ``` HTTP/1.1 200 OK Date: Fri, 10 Jul 2020 19:47:04 GMT Content-Type: application/octet-stream Content-Length: 0 Content-Disposition: attachment; filename="another secret document.pdf" Location: google.com Authorization: "example_of_session_fixation" ``` ### Patches This issue has been patched in `v1.12.6` with commit [579](https://github.com/gofiber/fiber/pull/579/commits/f698b5d5066cfe594102ae252cd58a1fe57cf56f) escaping the filename by default. ### Workarounds You could of course serialize the input yourself before passing it to `ctx.Attachment()`, this is actually a good practice by default. But in case you forget, we got you covered 👍 ### References A CRLF injection attack is one of several types of injection attacks. It can be used to escalate to more malicious attacks such as Cross-site Scripting (XSS), page injection, web cache poisoning, cache-based defacement, and more. A CRLF injection vulnerability exists if an attacker can inject the CRLF characters into a web application, for example using a user input form or an HTTP request, [see acunetix](https://www.acunetix.com/websitesecurity/crlf-injection/) ### For more information If you have any questions or comments about this advisory: * Open an issue in [gofiber/fiber](https://github.com/gofiber/fiber) * Join us on [Discord](https://gofiber.io/discord)

Read the publisher's advisory

osv · GO-2021-0108

Published

Due to improper input sanitization, a maliciously constructed filename could cause a file download to use an attacker controlled filename, as well as injecting additional headers into an HTTP response.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2020-15111

Published

fiber

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "product": "fiber",
                    "vendor": "gofiber",
                    "versions": [
                        {
                            "status": "affected",
                            "version": "< 1.12.6"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2021-1299

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Jul 20, 2020, 5:40:14 PM

dateUpdated: Aug 4, 2024, 1:08:21 PM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2020-15111

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Modified

Weakness classifications: CWE-74 · CWE-93

Original publisher date fields

published: 2020-07-20T18:15:12.000

lastModified: 2026-06-17T02:56:04.517

1 source CPE criteria · context only
  • cpe:2.3:a:gofiber:fiber:*:*:*:*:*:*:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-9cx9-x2gp-9qvh

Published

github.com/gofiber/fiber

Go

SEMVER · introduced 0 → fixed 1.12.6

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GO-2021-0108

Published

github.com/gofiber/fiber

Go

SEMVER · introduced 0 → fixed 1.12.6

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 25 Nov 14:31 UTC · 276 of 278 readable · 272 fully read · documentation 469/469 current