Skip to content

Security hardening, exploit fix, external identifiers, and metadata rescan#379

Merged
therobbiedavis merged 3 commits intocanaryfrom
bugfix/admin-user-creation-exploit
Feb 27, 2026
Merged

Security hardening, exploit fix, external identifiers, and metadata rescan#379
therobbiedavis merged 3 commits intocanaryfrom
bugfix/admin-user-creation-exploit

Conversation

@therobbiedavis
Copy link
Collaborator

It was brought to my attention that there was a significant security flaw with the authentication system where some api endpoints would expose Listenarrs apikey. I have fixed this exploit by making those endpoint require authorization when authentication is enabled. While looking into this security flaw, I found others as well that I have fixed, including one where the images were loaded by passing the apikey as a query param. Additionally, for clarity, there is now a banner warning you that authentication is disabled to make sure you're aware of the risk.

Audible seems to change ASINs for their books sometimes. so this release also adds the ability to add additional identifiers (ASIN, ISBN, or OLID), and the ability rescan for metadata based on the primary identifier. Additionally if audiobook covers or authors for items in your library go missing from the cache, then Listenarr will now try to automatically redownload it from the metadata provider and cache it in an attempt to recover and not show the placeholder. You can find a full list of changes and fixes below and in the CHANGELOG.md.

Changed

  • Added no-auth deployment warnings (backend startup log + frontend banner).
  • Improved API secret handling with caller-aware response redaction.
  • Unified protected image loading behavior in AudiobooksView to match auth-safe blob loading used elsewhere.
  • Streamlined AudiobooksView and AudiobookDetailView behavior (tab sync, status navigation, action config, selection/status handling).
  • Added responsive shell offset handling using shared top-offset variables (App, AudiobooksView, SettingsView) so fixed toolbars/legends behave correctly with the security banner.
  • Edit Audiobook modal now uses large layout.

Added

  • Typed audiobook external identifiers (ASIN, ISBN, OLID) with migration/backfill and legacy compatibility.
  • Identifier editing API and UI (including primary indicator/source badges).
  • POST /api/library/{id}/rescan-metadata endpoint and detail-view action.
  • Metadata/image recovery using stored identifiers + stronger OpenLibrary fallbacks.
  • Shared security helpers:
  • request trust evaluation
  • secret hashing for logs
  • sensitive endpoint access guard
  • outbound request URL/DNS/final-URI validation
  • API response redaction
  • Additional regression tests for identifiers, metadata rescan, image fallback, and security hardening.

Fixed

  • startup config API key exposure (redaction / secret handling)
  • anonymous admin registration escalation path
  • Identifier provenance spoofing (source) on user writes.
  • Duplicate identifier rows in identifier edit UI.
  • Metadata rescan response leaking attempted IDs.
  • Metadata rescan abuse risk (cooldown/rate limiting + attempt caps).
  • Logging leaks (raw header dumps and token/API-key prefix logging).
  • SSRF hardening gaps for notifications/indexer test/import flows.
  • Debug/diagnostic/process-control endpoints exposed to remote unauthenticated callers.
  • Audiobook image auth failures in authenticated mode ( direct-call 401s).
  • Multiple image fallback/cache-miss failures (Audimeta/Audnexus/OpenLibrary chain).
  • Author cards using audiobook cover fallback instead of placeholder.
  • Genres not appearing after metadata rescan due to incomplete detail payload.
  • Runtime formatting bug in audiobook details (minutes interpreted incorrectly).
  • Audiobooks/detail status navigation tab mismatch.
  • Various frontend test failures/warnings.

Removed

  • Raw request-header dumps in session auth logging.
  • Public exposure of attempted identifier details in metadata-rescan error responses.
  • Author-image fallback to audiobook covers.
  • Duplicate imported/manual identifier presentation for identical normalized IDs.

Exclude generated/packaged C# files under the publish directory from compilation by adding Compile Remove entries (both backslash and forward-slash globs) to the Listenarr.Api.csproj. Includes a comment explaining the change and fixes EOF newline. This avoids published artifacts being recompiled on subsequent builds/publishes and handles different path separators.
Bump frontend package version and update dev dependencies; refresh package-lock.json to capture updated versions (eslint, jsdom, eslint-plugin-cypress, @types/jsdom, etc.). Also apply changes to Listenarr.Api.csproj (project file updated to align with build/dependency changes). These updates keep dependencies current and ensure the repo and project files remain in sync.
Delete unused static assets from listenarr.api/wwwroot: remove fonts/.gitkeep and fonts/README.md (font self-hosting placeholders), large-logo.png, and stats.html (bundle analysis page). Cleans up generated or unneeded frontend artifacts from the API wwwroot.
@therobbiedavis therobbiedavis merged commit 573b69e into canary Feb 27, 2026
7 checks passed
@therobbiedavis therobbiedavis deleted the bugfix/admin-user-creation-exploit branch February 27, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant