# GHSA-x565-32qp-m3vf: phin may include sensitive headers in subsequent requests after redirect

> The phin library may leak sensitive headers to unintended destinations during redirects, exposing confidential data to attackers.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Apr 2024

## What is GHSA-x565-32qp-m3vf?

GHSA-x565-32qp-m3vf is a vulnerability in phin, published on 11 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

Users may be impacted if sending requests including sensitive data in specific headers with `followRedirects` enabled.

### Patches

The [follow-redirects](https://github.com/follow-redirects/follow-redirects) library is now being used for redirects and removes some headers that may contain sensitive information in some situations.

### Workarounds

N/A. Please update to resolve the issue.

## Which versions are affected by GHSA-x565-32qp-m3vf?

2 open source packages ship an affected version, including phin.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `phin` | npm | All versions | 3.7.1 |
| `phin` | npm | All versions | 3.7.1 |

## How do I fix GHSA-x565-32qp-m3vf?

Upgrade phin to 3.7.1 or later.

## Is GHSA-x565-32qp-m3vf being exploited?

There is no known exploitation of GHSA-x565-32qp-m3vf in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-x565-32qp-m3vf and fix it if it is affected.

What it is: GHSA-x565-32qp-m3vf is a vulnerability in phin, published on 11 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-x565-32qp-m3vf in the wild and no public exploit code.

Affected packages and fixed versions:
- phin (npm): affected all versions; fixed in 3.7.1
- phin (npm): affected all versions; fixed in 3.7.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-x565-32qp-m3vf/ (Markdown: https://insights.sbomify.com/GHSA-x565-32qp-m3vf/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-x565-32qp-m3vf

---
From sbomify Insights: https://insights.sbomify.com/GHSA-x565-32qp-m3vf/
Summaries are generated and may contain mistakes; the official description above is the record.
