Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

CVE-2026-57209

CVE-2026-57209 is a security vulnerability in github.com/dadrus/heimdall. O3 Security confirms whether CVE-2026-57209 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

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

Also known asGO-2026-5125
Published
Jun 18, 2026
Updated
Jul 20, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Jul 20, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐹github.com/dadrus/heimdall

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/dadrus/heimdallall versions0.17.17

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/dadrus/heimdall. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update github.com/dadrus/heimdall to 0.17.17 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-57209 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-57209 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-57209. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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)** ```go entry := "for=" + clientIP + ";host=" + in.Host + ";proto=" + proto ``` Go's `net/http` allows commas and semicolons
O3 Security · Impact-Aware SCA

Is CVE-2026-57209 in your dependencies?

O3 detects CVE-2026-57209 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.