Categories
CVE-2020-15111

Vulnerability in github.com/gofiber/fiber (CVE-2020-15111)

Summary

Vulnerability in github.com/gofiber/fiber (CVE-2020-15111). Risk of unauthorized operations or information disclosure. Exploitable via Authorization header. Mitigation: upgrade to 1.12.6 or later.

Original description

The description as published by the source.

Impact

The filename that is given in c.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

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 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 inject…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2020-15111 has been found in github.com/gofiber/fiber.
Attackers can target a specific entry point like Authorization header over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade github.com/gofiber/fiber to 1.12.6 or later.
If unsure, ask your IT team or search "github.com/gofiber/fiber CVE-2020-15111" on the vendor's site.

CVE-2020-15111 (github.com/gofiber/fiber) — CWE-74
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: Authorization header
Patched: 1.12.6 — apply immediately
Workaround: You could of course serialize the input yourself before passing it to ctx.Attachment(), this is actually a good practice by default.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-74) exists in github.com/gofiber/fiber. Attackers reach the vulnerable code path via Authorization header without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of github.com/gofiber/fiber. Attack surface: Authorization header.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 1.12.6.

🛡️ Workaround

Workaround: You could of course serialize the input yourself before passing it to ctx.Attachment(), this is actually a good practice by default.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/gofiber/fiber' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'github.com/gofiber/fiber' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で github.com/gofiber/fiber を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    You could of course serialize the input yourself before passing it to `ctx.Attachment()`, this is actually a good practice by default.

    パッチが適用されるまでの応急処置として、You could of course serialize the input yourself before passing it to ctx.Attachment(), this is actually a good practice by default. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade github.com/gofiber/fiber to 1.12.6

    ステージング環境で 1.12.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

Go github.com/gofiber/fiber
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.12.6"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details