Categories
CVE-2026-53624 medium CVSS 4.8

Vulnerability in github.com/gofiber/fiber (CVE-2026-53624)

Summary

Vulnerability in github.com/gofiber/fiber (CVE-2026-53624). Risk of unauthorized operations or information disclosure. Exploitable via helmet. Mitigation: upgrade to 3.4.0 or later.

Original description

The description as published by the source.

Summary

The helmet middleware in gofiber/fiber never sets the Strict-Transport-Security (HSTS) response header, even when HSTSMaxAge is explicitly configured, because the condition check at helmet.go:67 uses c.Protocol() — which returns the HTTP protocol version string (e.g., "HTTP/1.1", "HTTP/2.0") — instead of c.Scheme() — which returns the URL scheme ("http" or "https"). Since c.Protocol() never equals "https" in any real deployment, the HSTS header is permanently disabled, defeating the security protection.

Details

Root cause: middleware/helmet/helmet.go, line 67:

if c.Protocol() == "https" && cfg.HSTSMaxAge != 0 {

c.Protocol() (defined at req.go:865-867) delegates to fasthttp.Request.Header.Protocol(), which returns the HTTP protocol version:

  • "HTTP/1.1" for HTTP/1.1 connections
  • "HTTP/2.0" for HTTP/2 connections

The correct method is c.Scheme() (defined at req.go:844-862), which returns:

  • "http" for plain HTTP connections
  • "https" for TLS connections

Since "HTTP/1.1" != "https" always evaluates to true, the entire HSTS block (lines 67-76) is dead code.

Note on test coverage: The existing helmet test (helmet_test.go) passes because it uses ctx.Request.Header.SetProtocol("https") to artificially force Protocol() to return "https". However, fasthttp.Request.Header.SetProtocol() sets the HTTP version field, and real HTTP requests never have protocol "https" — they have `"HTTP/1…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

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-2026-53624 has been found in github.com/gofiber/fiber.
Attackers can target a specific entry point like helmet over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 4.8/10.
What to do: upgrade github.com/gofiber/fiber to 3.4.0 or later.
If unsure, ask your IT team or search "github.com/gofiber/fiber CVE-2026-53624" on the vendor's site.

CVE-2026-53624 (github.com/gofiber/fiber) — CWE-319 / CVSS v3 4.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: helmet / HSTSMaxAge / true / helmet_test.go
Patched: 3.4.0 — apply immediately
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-319) exists in github.com/gofiber/fiber. Attackers reach the vulnerable code path via helmet without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of github.com/gofiber/fiber. Attack surface: helmet / HSTSMaxAge / true / helmet_test.go.

🔥 Severity

Severity: Medium (CVSS 4.8/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 3.4.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 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 patch patch
    Upgrade github.com/gofiber/fiber to 3.4.0

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

  3. 3
    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":"3.4.0"}]}]
Go github.com/gofiber/fiber/v3
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.4.0"}]}]

References

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