Skip to content

v0.28.68

Choose a tag to compare

@zalando-robot zalando-robot released this 04 Nov 12:40
743c3b7

Changes

fastcgi: do not pass client Proxy header as HTTP_PROXY (#4367)

Regression test against master, go test ./proxy/fastcgi -run TestFastCgiDropsProxyHeader:

fastcgi_test.go:107: Proxy header passed to FastCGI application as
HTTP_PROXY: "http://attacker.example:3128"
--- FAIL: TestFastCgiDropsProxyHeader (0.00s)

Expected: a client supplied Proxy header never reaches the FastCGI
application. Actual: gofast.MapHeader maps it to HTTP_PROXY, which
PHP getenv("HTTP_PROXY") and CGI-unaware HTTP clients read as the
outbound proxy, so any client can route the application's outgoing
requests through a host it controls (httpoxy, CVE-2016-5385 class).
Proxy is not in the proxy's hop header list, so nothing strips it
earlier.

Fix: delete HTTP_PROXY in the existing param middleware in
NewRoundTripper, next to the REQUEST_SCHEME cleanup. This matches
what Go's net/http/cgi, nginx and Apache do. The test passes with the
patch; go vet and staticcheck are clean for the package.

Multiarch Docker image

Multiarch Docker image is available in GitHub's docker registry:

docker run -it ghcr.io/zalando/skipper:v0.28.68 skipper --help