/

CVE-2026-40925

Severity:

HIGH RISK

(8.3)

CSRF in AVideo Global Configuration Update Endpoint

CVE-2026-40925

Analyzed

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-352

Impact:

Unauthorized Configuration Manipulation and Account-Scoped Compromise

Severity:

HIGH RISK

(8.3)

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

A cross-site request forgery issue in AVideo allows an attacker to silently rewrite critical global site settings by abusing an administrator's existing session.

When a logged-in admin visits a malicious page, the browser can auto-submit a crafted cross-origin POST to the configuration update endpoint, changing encoder URLs, SMTP credentials, branding, and other site-wide options without explicit consent.

Affected context

This vulnerability affects AVideo deployments where:

  • The objects/configurationUpdate.json.php endpoint (also /updateConfig) is reachable over the web
  • Administrators maintain active login sessions in their browsers
  • Cross-origin embedding is enabled via session.cookie_samesite=None
  • No additional CSRF protections (tokens, origin checks, or trusted request filters) are enforced on administrative state-changing endpoints

The risk is most pronounced for admins who browse untrusted websites while logged into AVideo.

Exploit preconditions

  • Attack surface: HTTP POST requests to objects/configurationUpdate.json.php or /updateConfig
  • Required access: The victim must be an authenticated AVideo administrator with an active session in their browser
  • Attacker position: Ability to host or inject content into a web page that the admin visits (e.g., malicious site, ad, or compromised page)
  • Trigger point: The browser automatically sends a cross-origin POST (e.g., via HTML form, JavaScript, or auto-submitting iframe) while reusing the admin's session cookies
  • Why exploitation is possible:
  • The endpoint relies solely on User::isAdmin() and session cookies for authorization
  • session.cookie_samesite=None explicitly allows cookies on cross-site requests
  • No forbidIfIsUntrustedRequest() call, CSRF token, or Origin/Referer validation is present to distinguish trusted from untrusted requests

Why this happens

The root cause is the absence of CSRF defenses on a powerful configuration endpoint that trusts browser-supplied cookies alone for authorization.

By setting session.cookie_samesite=None to support cross-origin iframe use, AVideo allows authenticated cookies to accompany cross-site POSTs.

Because configurationUpdate.json.php accepts many configuration parameters directly from $_POST and only checks User::isAdmin(), any cross-site request from a page visited by an admin is treated as legitimate.

This matches CWE-352: Cross-Site Request Forgery (CSRF), where state-changing actions are performed on behalf of an authenticated user without their explicit intent, due to missing request-origin validation and CSRF tokens.

Potential impact

  • Silent modification of the site's encoder URL, potentially redirecting encoding jobs to attacker-controlled infrastructure
  • Overwrite of SMTP credentials and email settings, enabling email interception, phishing, or denial of notification delivery
  • Tampering with site <head> HTML to inject tracking tags, malicious scripts, or SEO spam
  • Replacement of the logo, favicon, and branding assets to impersonate other services or distribute disinformation
  • Manipulation of contact email and other global metadata, leading to loss of trust and support channel hijacking
  • Broader administrative confusion and misconfiguration, possibly aiding further social engineering or technical attacks

General mitigation guidance

Effective mitigation focuses on strengthening request-origin verification and reducing blind trust in browser-delivered state-changing requests:

  • Introduce robust CSRF protections on all authenticated, state-changing endpoints (including configuration update routes), such as synchronizer tokens or double-submit cookies.
  • Enforce strict Origin and/or Referer validation for admin-only POST endpoints, accepting only trusted domains.
  • Centralize a "trusted request" check (e.g., a forbidIfIsUntrustedRequest() pattern) and call it from sensitive controller actions.
  • Limit the scope of cross-origin interactions where possible, and only use SameSite=None for cookies that explicitly require it.
  • Separate read-only admin UI actions from write operations, and apply stronger safeguards and explicit confirmations for bulk configuration updates.
  • Apply the principle of least privilege in configuration APIs, splitting monolithic endpoints into narrowly scoped, well-validated operations.

How teams detect issues like this

Detection typically combines code-level review with behavioral monitoring:

  • Static analysis and code review:
  • Search for admin or configuration endpoints that accept POST data but lack CSRF token verification or origin checks.
  • Flag uses of $_POST in privileged controllers that only rely on role checks (e.g., User::isAdmin()) without additional request trust validation.
  • Identify cookies explicitly configured with SameSite=None and verify they are protected by CSRF mitigations at all sensitive endpoints.
  • Policy and tooling:
  • Enforce secure coding guidelines requiring CSRF protections for all authenticated state-changing routes.
  • Integrate automated review tools or linters that detect missing CSRF checks or origin validation patterns in web controllers.
  • Operational monitoring:
  • Monitor logs for suspicious bursts of configuration changes originating from unusual referrers, IP ranges, or user-agents.
  • Alert on multi-field configuration updates that deviate from normal administrative behavior patterns.

Sources

SourceLink
github.comgithub.com/WWBN/AVideo/commit/f9492f5e6123dff0292d5bb3164fde7665dc36b4
github.comgithub.com/WWBN/AVideo/security/advisories/GHSA-vvfw-4m39-fjqf

Frequently asked

questions

Yes. An attacker can exploit it remotely by luring a logged-in AVideo administrator to visit a malicious web page; no direct network access to the AVideo server is required beyond its normal availability.

The attacker does not need their own account. Exploitation relies on the victim already being logged in as an administrator, with the browser automatically attaching valid session cookies to the forged request.

Apply a unified CSRF protection mechanism to all authenticated state-changing endpoints, combining server-side CSRF tokens, Origin/Referer checks, and a standard "trusted request" guard that is invoked in configuration and admin controllers. Avoid relying solely on role checks based on cookies.

Adopt a security-by-default framework for request handling: mandate CSRF defenses on non-idempotent routes, carefully review any decision to set cookies with SameSite=None, and incorporate automated checks and code review guidelines that flag new endpoints lacking origin verification or CSRF tokens.

Find out what's already
exploitable in your codebase.