#8995·Sonarr

[Bug] /api/v3/release?seriesId= without seasonNumber silently falls back to GetRss()

Author: AresitooCreated Sep 28, 2026Updated Sep 28, 2026
Labelsneeds-triage

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

Calling /api/v3/release?seriesId=\ (without \seasonNumber) silently ignores \seriesId\ and falls through to \GetRss(), returning an unscoped global pool of releases with HTTP 200 instead of scoping to the series or returning 400 Bad Request.

In \src/Sonarr.Api.V3/Indexers/ReleaseController.cs\ (lines 147–160):

\csharp [HttpGet] [Produces(\ application/json)] public async Task<List> GetReleases(int? seriesId, int? episodeId, int? seasonNumber) { if (episodeId.HasValue) { return await GetEpisodeReleases(episodeId.Value); }

if (seriesId.HasValue && seasonNumber.HasValue)
{
    return await GetSeasonReleases(seriesId.Value, seasonNumber.Value);
}

return await GetRss();

} If \seriesId\ is provided alone without \seasonNumber, the condition \seriesId.HasValue && seasonNumber.HasValue\ evaluates to false, and execution falls straight down to eturn await GetRss().

Expected Behavior

Either:

  • Implement a series-level search when \seriesId\ is provided alone, OR
  • Return Ā Bad Request\ explaining that \seasonNumber\ is required when querying by \seriesId.

Steps To Reproduce

  1. Query \GET /api/v3/release?seriesId=123\ on any valid monitored series (without \seasonNumber).
  2. Observe HTTP 200 OK returned with hundreds of unrelated releases from the RSS feed across all monitored series and indexers (measured in production: 774 unrelated releases returned).
  3. Query \GET /api/v3/release?episodeId=456\ for an episode of that series.
  4. Observe HTTP 200 OK returned with releases strictly scoped to that specific episode.

Environment

  • OS: Linux / Docker
  • Sonarr: 4.0.20.3014
  • Docker Install: Yes
  • Using Reverse Proxy: No
  • Database: SQLite 3.41.2

What branch are you running?

Main

Trace Logs

N/A — Controller argument routing issue verified directly against \src/Sonarr.Api.V3/Indexers/ReleaseController.cs:154:

\csharp if (seriesId.HasValue && seasonNumber.HasValue) { return await GetSeasonReleases(seriesId.Value, seasonNumber.Value); }

return await GetRss(); Because \GetReleases\ accepts \seriesId\ in its signature, any client querying elease?seriesId=\ receives a valid HTTP 200 response with plausible-looking data (the RSS pool), creating a silent footgun for external automation and API integrations.

Anything else

No response