Summary
AVideo's SocialMediaPublisher plugin contains a missing authorization check in the add.json.php endpoint, allowing an authenticated user to target OAuth token records belonging to other users.
By supplying another record's identifier, an attacker may overwrite stored access and refresh tokens or delete the record, potentially disrupting provider integrations and exposing connected account access.
Affected context
The vulnerability occurs in AVideo deployments where the SocialMediaPublisher plugin exposes the add.json.php endpoint and relies on a client-supplied record identifier. The risk is present when authenticated users can reach the endpoint but the application does not verify that the selected OAuth token record belongs to the requesting user or is otherwise authorized for modification.
Exploit preconditions
- Attack surface: The SocialMediaPublisher plugin's add.json.php endpoint
- Required access: An authenticated AVideo account with permission to invoke the endpoint
- Trigger point: A request that supplies an arbitrary OAuth token record identifier
- Why exploitation is possible: Server-side authorization does not adequately bind the target record to the authenticated user's identity or permitted scope
Why this happens
The underlying defect is an object-level authorization failure. The endpoint accepts a record identifier and performs update or deletion operations without reliably confirming that the authenticated principal owns the referenced record or has an explicitly granted administrative role.
This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, commonly associated with insecure direct object references. The insecure pattern is trusting a client-controlled database key as sufficient authority to access or modify another user's data.
Potential impact
- An attacker may overwrite another user's stored OAuth access token or refresh token
- Connected social-media integrations may be disrupted or rendered unusable
- A malicious token may enable unauthorized activity through a linked provider account, depending on token validity and scope
- An attacker may delete a victim's provider linkage
- The application may experience integrity loss across user-specific credential records
General mitigation guidance
Mitigation generally focuses on enforcing object-level authorization for every operation involving user-owned records.
Common defensive patterns include:
- Deriving the target user from the authenticated session rather than trusting a client-supplied owner identifier
- Verifying record ownership or an explicit administrative authorization before updates and deletions
- Using scoped service-layer methods that enforce authorization consistently
- Limiting administrative capabilities through least-privilege roles and narrowly defined policies
- Treating OAuth tokens as sensitive secrets and reducing their exposure in logs, responses, and client-controlled fields
- Applying transaction and integrity controls so unauthorized record changes cannot be performed indirectly
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review checks for database queries that use request parameters without nearby ownership or policy checks
- Review of endpoints that accept numeric or opaque record identifiers for update, delete, or credential-management operations
- Authorization tests that attempt cross-user access using valid sessions from different accounts
- Runtime monitoring for repeated access to sequential or unrelated record identifiers
- Policy enforcement requiring object-level authorization checks in service and controller layers
Automated application-security testing and code-review tools may help identify missing authorization patterns, but targeted multi-user tests are useful for confirming enforcement behavior.

