Patrickhener goshs open redirect and header injection in redirect endpoint

Severity: low · CVSS 0 · Published 2026-04-14

goshs is a tool used to serve files over HTTP. A vulnerability in its redirect endpoint allows attackers to redirect users to malicious websites and inject custom web headers. This can be used to trick users into visiting phishing sites or to bypass security settings like HTTPS requirements, potentially compromising user sessions or data integrity.

Technologies: github.com/patrickhener/goshs (Go), github.com/patrickhener/goshs/v2 (Go). Vendors: Go.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Low severity, with a CVSS score of 0, published 14 April 2026.
Which products and versions are affected?
github.com/patrickhener/goshs (Go) <= 1.1.4; github.com/patrickhener/goshs/v2 (Go) <= 2.0.0-beta.6; Patrick Hener Goshs/V2 <= 2.0.0-beta.6.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run github.com/patrickhener/goshs (Go), github.com/patrickhener/goshs/v2 (Go) or Patrick Hener Goshs/V2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The `GET /?redirect` endpoint in `goshs` (v1 and v2 beta) fails to validate the `url` parameter, leading to an open redirect. Additionally, it accepts a `header` parameter that allows attackers to inject arbitrary 'Name: Value' pairs into the HTTP response headers without an allow-list. The endpoint lacks authentication in default deployments, does not implement CSRF protection, and ignores the 'Invisible' stealth mode flag. This combination allows attackers to perform cross-subdomain session fixation via `Set-Cookie` or force TLS downgrades by overwriting `Strict-Transport-Security` headers. Exploitation is possible via a simple network request to the affected endpoint.

Affected products

  • patrickhener goshs <= 1.1.4
  • patrickhener goshs/v2 <= 2.0.0-beta.6

Timeline

  • 2026-04-13: disclosed
  • 2026-04-14: advisory: Published to GitHub Advisory Database

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.