Vulnérabilité dans github.com/gofiber/fiber (CVE-2020-15111)
Résumé
Vulnérabilité dans github.com/gofiber/fiber (CVE-2020-15111). Risque d'opérations non autorisées ou de divulgation. Exploitable via Authorization header. Atténuation : mise à jour vers 1.12.6 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2020-15111 a été découverte dans github.com/gofiber/fiber.
Des attaquants peuvent cibler un point d'entrée spécifique comme Authorization header à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour github.com/gofiber/fiber vers 1.12.6 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/gofiber/fiber CVE-2020-15111 » sur le site de l'éditeur.
CVE-2020-15111 (github.com/gofiber/fiber) — CWE-74
Vecteur d'attaque : distant (réseau) / non authentifié
Surface d'attaque : Authorization header
Correctif : 1.12.6 — appliquer immédiatement
Contournement : 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, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-74) affecte github.com/gofiber/fiber. Les attaquants atteignent le code vulnérable via Authorization header sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/gofiber/fiber. Surface d'attaque : Authorization header.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 1.12.6.
Contournement : You could of course serialize the input yourself before passing it to ctx.Attachment(), this is actually a good practice by default.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify 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 し、稼働しているサービス・バージョンを把握する。 -
2Apply 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. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade github.com/gofiber/fiber to 1.12.6ステージング環境で 1.12.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web pkg.go.dev