Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Bump version to v0.8.21-alpha for CSRF-bypass security patch (CWE-287)
Murtaza Nasirbfbaa96db7a1
diff --git a/README.md b/README.mdindex 9f9dad17..5cf75d34 100644--- a/README.md+++ b/README.md@@ -9,7 +9,7 @@<a href="https://www.gnu.org/licenses/agpl-3.0"><img alt="AGPL v3" src="https://img.shields.io/badge/License-AGPL_v3-blue.svg"></a><a href="https://github.com/murtaza-nasir/speakr/actions/workflows/docker-publish.yml"><img alt="Docker Build" src="https://github.com/murtaza-nasir/speakr/actions/workflows/docker-publish.yml/badge.svg"></a><a href="https://hub.docker.com/r/learnedmachine/speakr"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/learnedmachine/speakr"></a>- <a href="https://github.com/murtaza-nasir/speakr/releases/latest"><img alt="Latest Version" src="https://img.shields.io/badge/version-0.8.20--alpha-brightgreen.svg"></a>+ <a href="https://github.com/murtaza-nasir/speakr/releases/latest"><img alt="Latest Version" src="https://img.shields.io/badge/version-0.8.21--alpha-brightgreen.svg"></a></p><p align="center">@@ -179,16 +179,20 @@ Complete documentation is available at **[murtaza-nasir.github.io/speakr](https:- [Troubleshooting](https://murtaza-nasir.github.io/speakr/troubleshooting) - Common issues and solutions- [FAQ](https://murtaza-nasir.github.io/speakr/faq) - Frequently asked questions-## Latest Release (v0.8.20-alpha)+## Latest Release (v0.8.21-alpha)-**Security: open-redirect fix in `is_safe_url` (CWE-601).** Patch release on top of v0.8.19-alpha.+**Security: CSRF bypass via unauthenticated API token parameter, plus chained SSO-only account takeover (CWE-287).** Patch release on top of v0.8.20-alpha. **All users should upgrade promptly.**-- The `is_safe_url()` helper validated `urljoin(request.host_url, target)` while `redirect()` was called with the raw `target`. A scheme-relative input such as `////evil.com` resolved to a same-host URL during validation but was emitted verbatim in the `Location` header, where browsers interpret it as a network-path-relative redirect to an attacker-controlled host.-- `is_safe_url()` now validates the raw target against a local-path allowlist: leading `/` required, scheme-relative URLs (`//`, `/\`), backslashes, control characters, and any value with a scheme or netloc are rejected. The duplicate copy in `src/api/auth.py` was removed; password login and the SSO `next` / callback flow share one validator.-- Reported by **RacerZ and Fushuling**. Tracked as a GitHub Security Advisory; CVE pending. Users on v0.8.19-alpha or earlier should upgrade promptly.+- The `csrf_exempt_for_api_tokens` before_request hook permanently disabled CSRF protection on the targeted view as soon as any request carried a `?token=` query parameter, even with a bogus value. The hook is gone; CSRF skipping is now a per-request decision driven by `load_user_from_token_headers_only()`, which validates the token against the database and only honours headers (not query strings) because a Simple Cross-Origin Request can carry one without preflight.+- `change_password` no longer silently sets a password on an SSO-only account (where `current_user.password` is None). That branch was used in the chained-takeover proof-of-concept; SSO users now must continue to authenticate through SSO until a dedicated "add password to SSO account" flow exists.+- Reported by **Irina Iarlykanova** (Snyk Security Labs). Tracked as a GitHub Security Advisory.No new features, no breaking changes.+### Previous Release (v0.8.20-alpha)++**Security: open-redirect fix in `is_safe_url` (CWE-601).** Patch release on top of v0.8.19-alpha. The `is_safe_url()` helper now validates the raw target against a local-path allowlist instead of an URL-joined form, closing the `////evil.com` bypass. Reported by RacerZ and Fushuling.+### Previous Release (v0.8.19-alpha)**Inquire-mode performance and re-embed reliability.** Patch release on top of v0.8.18-alpha. Vectorised chunk similarity search (60s → 2-3s on large libraries), embedding API retries with backoff, transactional rollback when a partial embedding response would otherwise drop chunks, and Re-embed all retry passes that include stale-chunk recordings regardless of status.diff --git a/VERSION b/VERSIONindex cedaa4cb..b0af4174 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-v0.8.20-alpha+v0.8.21-alphadiff --git a/docs/index.md b/docs/index.mdindex b69832d3..64b4c87b 100644--- a/docs/index.md+++ b/docs/index.md@@ -6,12 +6,12 @@ Speakr is a powerful self-hosted transcription platform that helps you capture,<img src="assets/images/screenshots/Main view.png" alt="Main Interface" style="border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);"></div>-!!! warning "Latest Release: v0.8.20-alpha - Security Patch (Open Redirect)"- **Open-redirect fix in `is_safe_url` (CWE-601).** Users on v0.8.19-alpha or earlier should upgrade promptly.+!!! warning "Latest Release: v0.8.21-alpha - Security Patch (CSRF Bypass + SSO Account Takeover)"+ **CSRF bypass via unauthenticated API token parameter, plus chained SSO-only account takeover (CWE-287).** All users should upgrade promptly.- - The validator previously checked `urljoin`-normalised URLs while `redirect()` used the raw value, so `next=////evil.com` could redirect users off-site after sign-in.- - `is_safe_url()` now validates the raw target against a local-path allowlist; the SSO `next` / callback flow and password login share one validator.- - Reported by **RacerZ and Fushuling**. Tracked as a GitHub Security Advisory; CVE pending.+ - The `csrf_exempt_for_api_tokens` before_request hook permanently disabled CSRF protection on the targeted view as soon as any request carried a `?token=` query parameter. Replaced with a per-request, header-only, database-validated check.+ - `change_password` no longer silently sets a password on an SSO-only account (where `current_user.password` is None); this was the chained-takeover path.+ - Reported by **Irina Iarlykanova** (Snyk Security Labs). Tracked as a GitHub Security Advisory.## Quick Navigation