{"answers":{"affected":"2 open source packages ship an affected version, including phanan/koel.","exploited":"There is no known exploitation of GHSA-8q6q-m837-fv64 in the wild and no public exploit code.","fix":"Upgrade phanan/koel to 9.7.0 or later.","what":"GHSA-8q6q-m837-fv64 is a server-side request forgery vulnerability in phanan/koel, published on 15 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-8q6q-m837-fv64 and fix it if it is affected.\n\nWhat it is: GHSA-8q6q-m837-fv64 is a server-side request forgery vulnerability in phanan/koel, published on 15 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-8q6q-m837-fv64 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- phanan/koel (Packagist): affected all versions; fixed in 9.7.0\n- phanan/koel (Packagist): affected all versions; fixed in 9.7.0\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-8q6q-m837-fv64/ (Markdown: https://insights.sbomify.com/GHSA-8q6q-m837-fv64/index.md)","id":"GHSA-8q6q-m837-fv64","markdown":"https://insights.sbomify.com/GHSA-8q6q-m837-fv64/index.md","name":"GHSA-8q6q-m837-fv64","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Koel music server","requires_auth":"low_privilege","summary":"Authenticated users can exploit SSRF in Koel's Subsonic API to access internal network services via podcast feed URLs.","user_interaction":"not_required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Summary\n\nKoel's Subsonic `createPodcastChannel.view` endpoint accepts a user supplied podcast feed URL and fetches it server-side before applying the safe URL checks that are used for podcast episode enclosure URLs. An authenticated Subsonic API user can provide a loopback or internal URL as the feed URL and cause the Koel backend to issue a request to that address.\n\nA related redirect gap exists in the podcast stream helper: `PodcastService::getStreamableUrl()` validates only the original URL, then lets Guzzle follow redirects and accepts the final redirected URL without re-validating it.\n\n## Impact\n\nAn attacker with any valid Koel account and Subsonic API key can trigger server-side requests from the Koel host to loopback or internal network services. This can be used for blind SSRF against internal HTTP endpoints reachable by the Koel deployment. If an internal service returns valid RSS/XML or permissive CORS responses, parts of the response or final URL may be reflected back through normal podcast or stream behavior.\n\n## Reproduction\n\n1. Start Koel v9.6.0 or current main and create a normal user.\n2. Obtain the user's Subsonic API key.\n3. Start a local canary HTTP server on the Koel host at `127.0.0.1:8103` that records requests and returns this minimal RSS feed:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003crss version=\"2.0\"\u003e\n  \u003cchannel\u003e\n    \u003ctitle\u003eInternal Canary Feed\u003c/title\u003e\n    \u003clink\u003ehttps://example.com/\u003c/link\u003e\n    \u003cdescription\u003eInternal feed SSRF canary\u003c/description\u003e\n    \u003citem\u003e\n      \u003ctitle\u003eEpisode One\u003c/title\u003e\n      \u003cguid\u003ekoel-internal-canary-episode-1\u003c/guid\u003e\n      \u003cpubDate\u003eMon, 01 Jun 2026 12:00:00 GMT\u003c/pubDate\u003e\n      \u003cenclosure url=\"https://example.com/episode.mp3\" length=\"1\" type=\"audio/mpeg\" /\u003e\n    \u003c/item\u003e\n  \u003c/channel\u003e\n\u003c/rss\u003e\n```\n\n4. Send an authenticated Subsonic request:\n\n```http\nGET /rest/createPodcastChannel.view?apiKey=\u003cSUBSONIC_API_KEY\u003e\u0026f=json\u0026url=http://127.0.0.1:8103/feed.xml HTTP/1.1\nHost: koel.example\n```\n\n5. The endpoint returns a successful Subsonic response and the canary records a backend request:\n\n```text\nGET /feed.xml\n```\n\nUnauthenticated control: the same request without a valid API key fails and does not hit the canary.\n\nRedirect control for the stream helper: calling `PodcastService::getStreamableUrl()` with direct `http://127.0.0.1:8102/secret` returns `null` and makes no canary request. Calling it with a safe-looking public URL that redirects to `http://127.0.0.1:8102/secret` causes the backend to request `OPTIONS /secret` and returns the loopback final URL.\n\n## Root cause\n\n`app/Http/Requests/Subsonic/CreatePodcastChannelRequest.php` validates `url` only as `required|string|url`. The controller passes it to `PodcastService::addPodcast()`, where `PodcastService.php` calls `createParser($url)` and `Poddle::fromUrl($url, ...)` before any `Network::isSafeUrl()` check. The enclosure URL guard in `synchronizeEpisodes()` runs later and only covers episode enclosure URLs, not the feed URL that was already fetched.\n\nFor streaming, `PodcastService::getStreamableUrl()` checks `Network::isSafeUrl($url)` on the original URL, then follows redirects with Guzzle and accepts the last redirect target from `X-Guzzle-Redirect-History` without validating that target.\n\n## Remediation\n\nValidate the podcast feed URL with the same safe URL policy before `Poddle::fromUrl()` performs any request. Re-validate every redirect target before following it, or disable automatic redirects and manually fetch only targets that pass the safe URL policy. Apply the same redirect validation in `getStreamableUrl()`. Add regression tests for direct loopback and private IP feed URLs, DNS names resolving to private ranges, and public URL to loopback redirects.","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Koel has SSRF through Authenticated Subsonic podcast feed URLs","id":"GHSA-8q6q-m837-fv64","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"ssrf","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["9.7.0"],"introduced":["0"],"last_affected":[],"package":"phanan/koel","purl":null,"source":"GHSA-8q6q-m837-fv64"},{"ecosystem":"Packagist","fixed":["9.7.0"],"introduced":["0"],"last_affected":[],"package":"phanan/koel","purl":"pkg:composer/phanan/koel","source":"GHSA-8q6q-m837-fv64"}],"products":null,"published":"2026-07-15","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Authenticated users can exploit SSRF in Koel's Subsonic API to access internal network services via podcast feed URLs.","url":"https://insights.sbomify.com/GHSA-8q6q-m837-fv64/"}