/

CVE-2026-54510

Severity:

HIGH RISK

(7.1)

CSRF Bypass (CWE-352) in Speakr Web Application Routes

CVE-2026-54510

Deferred

Vulnerability type

Category:

Cross-Site Request Forgery

CWE:

CWE-287, CWE-352

Impact:

Unauthorized state-changing actions and potential account or privilege compromise

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Speakr contains a CSRF protection bypass caused by trusting any supplied API token and permanently exempting a view from CSRF checks for the worker lifetime. A network-reachable attacker who can meet the browser cookie and sibling-subdomain conditions may use cross-origin requests to change account settings, administrative status, or passwords, potentially bypassing SSO protections.

Affected context

The issue occurs in Speakr deployments using the affected request hook and token-authentication logic. A token supplied through a request, including a query parameter, may be treated as valid without cryptographic verification or database lookup. The risk is highest where browser cookies are sent to the application and attacker-controlled content can run on a sibling subdomain under the deployment's cookie configuration.

Exploit preconditions

  • Attack surface: Network-reachable Speakr HTTP endpoints and browser-authenticated sessions
  • Required access: The attacker generally needs control of content on a qualifying sibling subdomain or another way to induce a victim browser to make cross-origin requests
  • Trigger point: A request containing a token causes the targeted view to be added to the process-global CSRF exemption set
  • Why exploitation is possible: Token presence is accepted as authentication without validation, and the exemption persists for the worker lifetime across HTTP methods, allowing a later state-changing request to bypass CSRF validation

Why this happens

The vulnerability combines improper authentication validation with incorrect CSRF exemption state management. The token-authentication function treats the presence of any token as proof of authentication rather than verifying its integrity, existence, or authorization, which maps to CWE-287: Improper Authentication. The request hook then permanently modifies a process-global exemption collection for a view, allowing a cross-origin request to affect later state-changing requests; this maps to CWE-352: Cross-Site Request Forgery because browser ambient authority can be used without a valid anti-CSRF control.

Potential impact

  • An attacker could modify profile data, prompts, transcription settings, or preferences
  • An attacker could change administrative status where the affected route is reachable
  • An attacker could set a local password on an SSO-only account when the current-password check is skipped
  • An attacker could weaken account authentication and potentially bypass intended SSO controls
  • A compromised worker process could expose the CSRF bypass to subsequent requests handled by that worker

General mitigation guidance

Mitigation generally focuses on validating authentication independently of token presence and keeping CSRF policy deterministic for every request.

Common defensive patterns include:

  • Hashing and verifying tokens against an authoritative store before treating them as authenticated
  • Rejecting malformed, expired, unknown, or otherwise unauthorized tokens
  • Avoiding request-time mutation of process-global CSRF exemption state
  • Applying CSRF checks consistently to state-changing methods and requiring explicit, validated exemptions only where justified
  • Requiring current credentials or an equivalent verified recovery flow before setting a password or changing authentication mode
  • Using secure cookie attributes and avoiding sibling-domain cookie scope when it is not required
  • Enforcing least privilege for administrative operations and separating SSO-only account behavior from local-password workflows

How teams detect issues like this

Detection approaches can include:

  • Static analysis for authentication decisions based only on token presence
  • Code review checks for query-string credentials, missing token hashing or database validation, and password changes without current-credential verification
  • Searches for CSRF exemption APIs called inside request hooks or other paths that mutate process-global state
  • Tests that make cross-origin requests across HTTP methods and verify that exemptions do not persist between requests
  • Policy enforcement requiring CSRF protection for state-changing routes and validated authentication for every privileged action
  • Automated security review tools configured to flag CWE-287 and CWE-352 patterns

Sources

SourceLink
github.comgithub.com/murtaza-nasir/speakr/commit/70e193e47b664bedf274f62aea14220f2a85a459
github.comgithub.com/murtaza-nasir/speakr/releases/tag/v0.8.21-alpha
github.comgithub.com/murtaza-nasir/speakr/security/advisories/GHSA-x4q4-3ww4-h329

Frequently asked

questions

The vulnerable endpoints are network reachable, but practical browser exploitation generally depends on a victim's authenticated cookies and attacker-controlled content on a qualifying sibling subdomain under the application's cookie conditions.

No. The affected logic treats the presence of a token as sufficient, so a false token may trigger the CSRF exemption behavior.

Validate tokens cryptographically and against the intended authorization source, while applying CSRF exemptions through static, narrowly scoped policy rather than process-global request-time mutation.

Test authentication and CSRF controls together across methods and origins, require current credentials for password changes, restrict cookie scope, and use code-review policies that prohibit trust decisions based solely on credential presence.

Find out what's already
exploitable in your codebase.