Heimdall client IP spoofing in trusted proxy header parsing
dadrus heimdall
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| https://github.com/dadrus/heimdall Go |
|
|
| github.com/dadrus/heimdall Go |
|
|
dadrus heimdall
| Product | Affected | Fixed in |
|---|---|---|
| https://github.com/dadrus/heimdall Go |
|
|
| github.com/dadrus/heimdall Go |
|
|
Heimdall is a cloud native Identity Aware Proxy and Access Control Decision service. Prior to version 0.17.17, when the trusted_proxies option is configured, heimdall extracts client IP addresses from the Forwarded (for= parameter) and X-Forwarded-For headers and exposes them as Request.ClientIPAddresses to the rule pipeline. However, extracted values are not validated to be syntactically valid IP addresses. Arbitrary strings, malformed IP literals, and RFC 7239 unknown values and obfuscated identifiers are accepted without further checks. In addition, the Forwarded header parser splits on , and ; without accounting for RFC 7239 quoted strings, which can cause a single quoted value to be parsed as multiple entries, with fragments — including trailing quote characters — treated as independent addresses. This issue has been patched in version 0.17.17.
From the CVE record · GitHub_M
Before 0.17.17, heimdall does not validate client IP addresses extracted from Forwarded and X-Forwarded-For headers when trusted_proxies is configured. A remote requester can supply malformed or arbitrary values that reach the rule pipeline as client IP addresses; quoted Forwarded values can also be split into separate entries. Authentication and user-interaction requirements are not specified.
Operators using dadrus heimdall or its Go package at versions earlier than 0.17.17 should check whether trusted_proxies is configured.