Skip to main content

CVE-2026-57209 — Vulnerability in github.com/dadrus/heimdall

HIGH

Heimdall: Forwarded Header Injection via Unsanitized Host Header in Proxy Mode

Published June 18, 2026Updated July 20, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.46%). Schedule for your next planned update.

Does your project use an affected github.com/dadrus/heimdall version?

Paste your go.sum to check it for CVE-2026-57209 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

Summary

Summary

When Heimdall operates in proxy mode, it constructs the Forwarded HTTP header after executing the matched rule pipeline by inserting the incoming request's Host header value directly into the header string without sanitizing commas or semicolons. This allows an attacker to inject additional parameters into the Forwarded header, potentially spoofing IP addresses for upstream services.

Vulnerable Code

File: proxy/request_context.go (line 201)

entry := "for=" + clientIP + ";host=" + in.Host + ";proto=" + proto

Go's net/http allows commas and semicolons in Host header values. No sanitization is applied before string concatenation.

PoC

# Inject a spoofed IP into the Forwarded header
curl -s -H "Host: evil.com,for=127.0.0.1" \
  "http://TARGET:PORT/protected-resource"

This produces the following Forwarded header sent to the upstream service:

Forwarded: for=1.2.3.4;host=evil.com, for=127.0.0.1;proto=http

Upstream services that parse the Forwarded header according to RFC 7239 will see two entries. If the service trusts the last or any for= value, the attacker successfully spoofs 127.0.0.1 as the client IP.

# More targeted attack: spoof to bypass IP allowlist
curl -s -H "Host: legit.com;for=10.0.0.1;proto=https,for=192.168.1.1" \
  "http://TARGET:PORT/admin-panel"

Impact

  • IP spoofing: Upstream services behind Heimdall may trust the injected for= value, believing the request originates from an internal/trusted IP
  • Access control bypass: Applications that restrict access based on IP address by themselves, without using the corresponding heimdall capabilities (e.g., admin panels, internal APIs), can be bypassed
  • Affects all proxy-mode deployments where upstream services parse the Forwarded header.

Advisory Timeline

  • First published June 18, 2026 (161 days ago).
  • Last revised July 20, 2026 — 32 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/dadrus/heimdall to 0.17.17 or later
go get github.com/dadrus/heimdall@v0.17.17

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Go (1).

PackageFixed In
github.com/dadrus/heimdall Go · Affected: All versions0.17.17

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N

Frequently Asked Questions

What is CVE-2026-57209?
Heimdall: Forwarded Header Injection via Unsanitized Host Header in Proxy Mode. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.9/10).
How do I check if my project is affected by CVE-2026-57209?
CVE-2026-57209 affects github.com/dadrus/heimdall. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-57209 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.9

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.46%
EPSS percentile: 32

This is a below-median EPSS score — only 32% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-4jgr-pg2m-m988
GO-2026-5125

Related CVEs

  • CVE-2026-42274
    HIGH

    Heimdall has an authorization bypass via path normalization mismatch

  • CVE-2026-42272
    HIGH

    Heimdall: Case-sensitive handling of URL-encoded slashes may lead to inconsistent path interpretation

  • CVE-2026-42273
    HIGH

    Heimdall: Case-sensitive host matching may lead to policy bypass

  • CVE-2026-108262
    HIGH

    DDEV incomplete tar symlink traversal fix allows host file overwrite - Incomplete fix of CVE-2026-32885

  • CVE-2026-130007
    HIGH

    k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum