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.phpendpoint (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.phpor/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=Noneexplicitly 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=Nonefor 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
$_POSTin privileged controllers that only rely on role checks (e.g.,User::isAdmin()) without additional request trust validation. - Identify cookies explicitly configured with
SameSite=Noneand 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.

