Skip to content

Security: F1ammetta/soncore

Security

SECURITY.md

Security policy

Supported versions

Security fixes go to the latest release in the current 0.1.x line. Older builds are not maintained.

Reporting a vulnerability

Use GitHub's private vulnerability reporting on this repository (Security → Report a vulnerability). Please do not open a public issue for an exploitable bug, and do not include SONCORE_SECRET_KEY, admin passwords, session cookies, API keys or full environment files in a report.

Include, where possible:

  • the version and build features (soncore -version),
  • whether the server is behind a proxy (SONCORE_TRUST_PROXY),
  • the request or UI action that triggers it,
  • the smallest reproduction you can manage.

You will get an acknowledgement as soon as the report is seen; this is a volunteer project, so response times are best-effort.

Scope

Things worth reporting:

  • authentication or authorisation bypass (/rest, /api, sharing, sessions),
  • path traversal or arbitrary file read through streaming, artwork, lyrics or cover ids,
  • SSRF or injection through the external lyrics/art providers,
  • secret leakage in logs, error pages, playlists or the SPA,
  • XSS or CSRF in the embedded UI,
  • SQL injection or unsafe handling of user-supplied ids and parameters.

Out of scope: denial of service through a deliberately huge local library, missing hardening headers that do not enable an exploit, and issues that require an already-compromised host.

Design notes that matter

  • Mutating /api/* requests require Content-Type: application/json and a SameSite=Strict session cookie; that is the CSRF defence.
  • The process is expected to bind to loopback behind TLS-terminating NGINX.
  • Subsonic legacy p= auth is refused over cleartext HTTP unless explicitly enabled.
  • The vault key (SONCORE_SECRET_KEY) protects sealed Subsonic passwords and Last.fm session keys; losing it invalidates both.

Operational notes

  • Subsonic token auth verifies md5(password + salt), so plaintext passwords are sealed at rest with AES-256-GCM under SONCORE_SECRET_KEY. A stolen database without the key is useless. Back the key up with the database.
  • Keep the process bound to loopback and terminate TLS at NGINX.
  • Legacy p= is plaintext by design and rejected over cleartext HTTP unless SONCORE_ALLOW_INSECURE_LEGACY=true. Over HTTPS, p=enc:<hex>, bare hex and raw plaintext are accepted.
  • internal/auth.Authenticator is the single seam for scoped device keys, OIDC/Authelia forward-auth and rate limiting.
  • Generated playlist covers and cover art are cached immutably; the ids carry a content hash or revalidate, so a changed image is not served under a stale cache entry.

There aren't any published security advisories