# Untrusted Host or forwarding-header origin construction

The application constructs a security-sensitive origin from request metadata that an attacker can influence.

**Candidate CWE:** [CWE-346](https://cwe.mitre.org/data/definitions/346.html)

## Test hypothesis

In the local proxy/application topology, capture a password-reset link for your own account. Change one Host or forwarded-origin input to a controlled sink and compare generated links and routing. Preserve the normal proxy path; direct-backend behavior is a separate reachability hypothesis.

## Evidence required

Show which hop accepted the untrusted value, the resulting sensitive link or policy decision, and a controlled artifact demonstrating impact. Treat cache poisoning as a separate chain requiring a second clean client.

## Rule out false positives

An echoed Host header or a denied invalid host is not a takeover. A backend trusted header that external callers cannot set is not attacker-controlled in that deployment.

## Playbook and command references

- [Proxy normalization, cache isolation, and request boundaries](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/proxy-cache.html) — Investigate layered HTTP behavior with isolated cache keys and controlled front-end/back-end traffic.
- [Authentication, recovery, federation, and session lifecycle](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/identity-session.html) — Test registration, recovery, identity changes, invitations, SSO enforcement, and deprovisioning as one account state machine.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Proxy%20normalization%2C%20cache%20isolation%2C%20and%20request%20boundaries)

## Referenced by these target playbooks

[Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Cloud & containers](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/cloud.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [PortSwigger Host header attacks](https://portswigger.net/web-security/host-header)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
