GHSA-x565-32qp-m3vf
Medium · 4.3CVSS
4.3
EPSS
—
Published
Apr 11, 2024
CISA due date
—
Cloudanix analysis
A flaw in a common software component could cause applications to accidentally send secret credentials to the wrong server when being redirected.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Library
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability causes the `phin` HTTP client library to improperly handle redirects. When a request containing sensitive headers (e.g., `Authorization`, `Cookie`) is made to a server that responds with a redirect, the library forwards these same headers to the new destination specified in the redirect. This leaks potentially sensitive information to an arbitrary server.
Why it matters to the business
Applications using the vulnerable library risk leaking sensitive credentials, such as API keys, authentication tokens, or session cookies, to unintended third parties. This can lead to unauthorized access to internal systems, data breaches, account takeovers, and circumvention of security controls. The subsequent loss of customer trust and potential regulatory penalties can cause significant financial and reputational damage.
How an attack unfolds
An attacker would trick a server-side application using a vulnerable version of `phin` into making an HTTP request to a URL they control. This could be done through features that process user-supplied URLs, like webhooks or file importers. The attacker's server would respond with an HTTP redirect (e.g., 301 or 302) to another attacker-controlled endpoint. The vulnerable `phin` client follows this redirect but fails to strip sensitive headers from the original request, such as an `Authorization` token. The token is then sent to the attacker's second server, where it is logged and captured. The attacker can then use this stolen credential to impersonate the application and access its data and services.
How to fix it
The vulnerability is patched in version 3.7.1 of the `phin` npm package. Upgrade the `phin` dependency to version 3.7.1 or later. Use your package manager to update, for example, by running `npm install phin@^3.7.1` or `yarn upgrade phin --latest` and ensure the lock file is updated and committed.
How to confirm the fix worked
To confirm the fix, inspect your project's dependency tree to ensure the resolved version of `phin` is 3.7.1 or higher. You can use commands like `npm ls phin` or `yarn why phin` to verify the installed version. To test for exposure, create a test case where an application using `phin` makes a request with a dummy `Authorization` header to a controlled endpoint that issues a redirect. After patching, verify that the `Authorization` header is not present in the request sent to the final redirected destination.
Typical attack path
- An attacker identifies an application using a vulnerable version of the `phin` library that makes outbound requests based on user-provided input.
- The attacker submits a URL they control to the application.
- The application's backend uses `phin` to make a request to the attacker's URL, including sensitive headers required for its own operations.
- The attacker's server receives the request and responds with an HTTP redirect to a different attacker-controlled server.
- The vulnerable `phin` library follows the redirect, incorrectly re-sending the original sensitive headers to the new destination.
- The attacker's second server captures the leaked headers, including authentication tokens or API keys.
- The attacker uses the stolen credentials to gain unauthorized access to the application or its associated resources.
How to detect it
To detect potential exploitation, review outbound network traffic logs from servers running applications that use the `phin` library. Look for HTTP requests made by the application to external or unexpected domains that receive a 3xx redirect response. A subsequent request from the same application to the new, redirected location containing sensitive headers (e.g., `Authorization`, `Cookie`, `x-api-key`) is a strong indicator of exploitation. Correlate application logs with network flow data to trace these sequences.
What your security team should do
- Immediately update the `phin` package to version 3.7.1 or newer in all affected applications.
- Use dependency scanning tools to identify all instances of the vulnerable `phin` library across your software portfolio.
- As a precaution, rotate any credentials, API keys, or session tokens that may have been used in outbound requests made by services using the vulnerable library.
- Implement strict egress filtering and apply the principle of least privilege to the application's network access to limit its ability to connect to arbitrary external endpoints.
The record
phin may include sensitive headers in subsequent requests after redirect
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | phin | 0 | 3.7.1 |
Related vulnerabilities
- CVE-2026-62979 jack lets users share media libraries through their Radarr/Sonarr stack, peer-to-peer. CWE-200
- CVE-2026-55098 Arc is an open, SQL-native time-series database for telemetry. CWE-200
- CVE-2026-119331 Ladybird is a truly independent web browser. CWE-200
- CVE-2026-62264 PDF Reader MCP is a Model Context Protocol server for reading PDF documents. CWE-200
- CVE-2026-110305 The Advanced Custom Fields: Extended plugin for WordPress is vulnerable to Sensitive… CWE-200
- CVE-2026-61730 SOCFortress CoPilot focuses on providing a single pane of glass for all your security… CWE-200
- CVE-2026-119570 Parse Server from 9.7.0 before 9.10.5-alpha.7 contains an information disclosure… CWE-200
- CVE-2026-14467 An information disclosure vulnerability in the Forocoches comments editor that allows an… CWE-200