Skip to content

v1.4.1 — security release

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Sep 17:45
· 4 commits to main since this release

Librarr v1.4.1

This is a security release. Upgrading is recommended for all installations that have authentication enabled.

Security

Two vulnerabilities were reported privately through GitHub's security advisory process. Both reports were accurate, traced to the exact lines, and came with a working reproduction and a sound suggested fix. Thank you to both researchers.

Unauthenticated library disclosure via the OPDS feed — GHSA-368r-6vrp-m3pw (CVSS 7.5)

Reported by @furkan-arslan-sec.

The auth middleware exempted every path under /opds, on the assumption that e-readers authenticated separately. Nothing did. On an instance with AUTH_USERNAME/AUTH_PASSWORD or user accounts configured, an anonymous client could list the library through /opds/books and /opds/search, and download every file by walking the sequential ids on /opds/download/{id}. All releases through v1.4.0 are affected.

No /opds route is exempt any more. E-readers sign in with HTTP Basic, which is what the README already told users to enter:

  • your Librarr username and password (or AUTH_USERNAME/AUTH_PASSWORD);
  • accounts with two-factor auth enabled, and SSO-only accounts, use the API_KEY value as the password instead (any username) — Basic cannot carry a second factor, and accepting the password alone would have made OPDS a way around it;
  • a browser session, X-Api-Key and ?apikey= keep working on these routes.

Repeated failed logins from one address are temporarily blocked. Instances with no authentication configured stay open, as before.

Reverse-proxy SSO identity headers trusted from any client — GHSA-mqf7-4vg4-fxj7 (CVSS 8.1)

Reported by @archnexus707.

With OIDC_PROXY_HEADERS_ENABLED=true, Librarr logged a request in as whatever X-Authentik-Username, Remote-User or X-Forwarded-User named — from any client, not just the reverse proxy. Anyone who could reach the port directly could send one header and become an existing user, including an administrator, or have an account auto-provisioned. Setting LIBRARR_TRUSTED_PROXIES did not help: the allowlist was never consulted for identity. Only deployments with proxy-header SSO enabled are affected.

Identity headers are now honored only when the connection comes from an address listed in LIBRARR_TRUSTED_PROXIES. From any other peer they are ignored, so a direct connection with a real session or API key still works and a header cannot override it.

Upgrade notes

  • If you use OIDC_PROXY_HEADERS_ENABLED, you must set LIBRARR_TRUSTED_PROXIES to your reverse proxy's IP or CIDR (for example LIBRARR_TRUSTED_PROXIES=172.18.0.5, or your Docker network's CIDR). Until you do, the identity headers are ignored: Librarr logs a warning at startup and users fall back to the "Login with SSO" button. This variable was previously undocumented; it is now in the README. Your proxy should also strip these headers from incoming client requests.
  • If you use OPDS with authentication enabled, your e-reader will now prompt for credentials. Enter your Librarr username and password, or the API key as the password for 2FA and SSO-only accounts. Basic auth sends the password with every request, so use HTTPS when the feed is reachable beyond your LAN.
  • No other configuration changes are required.

Other changes

  • Manga removal now works for locally imported series, with atomic cleanup, clearer provider error handling, and fixes for stale responses and last-page pagination in the library view (#120, closes #119).
  • docs/SECURITY_AUDIT.md previously listed the OPDS exposure as fixed. That fix was lost in a merge and never reached a release; the document now says so, and the new test probes every OPDS route anonymously through the full middleware chain so it cannot silently return.

Validation

The v1.4.1 tree passed the full project verifier (3/3), including 64 browser journeys, and the Go suite under the race detector. Both fixes were checked against a real binary with the reporters' own requests: the exploits return 401, while a reader with valid credentials and SSO through a genuinely trusted proxy keep working. Each regression test was confirmed to fail when the vulnerable decision is restored.

Upgrade

Pull ghcr.io/jeremiahm37/librarr:v1.4.1 (or :latest) and recreate your container while keeping your existing data and library mounts. Standalone binaries for Linux, macOS, and Windows are attached below.

Please report security issues through GitHub's private reporting rather than a public issue.