Advisory

GHSA-x2pw-9c38-cp2j

Details, part 2 of 2. The advisory

Details

Recommended Fix

  1. Call the existing forbidIfIsUntrustedRequest() helper at the top of every mutating objects/*.json.php handler (the same pattern already used in objects/userUpdate.json.php):
// objects/comments_like.json.php (add near line 9)
require_once $global['systemRootPath'] . 'objects/functionsSecurity.php';
forbidIfIsUntrustedRequest();

// objects/commentAddNew.json.php (add after configuration.php include)
require_once $global['systemRootPath'] . 'objects/functionsSecurity.php';
forbidIfIsUntrustedRequest();

// objects/categoryDeleteAssets.json.php (add after configuration.php include)
require_once $global['systemRootPath'] . 'objects/functionsSecurity.php';
forbidIfIsUntrustedRequest();
  1. Require $_SERVER['REQUEST_METHOD'] === 'POST' (or DELETE) for state-changing operations and stop promoting $_GET['comments_id'] → $_POST['comments_id'] in comments_like.json.php:15-17.
  1. Validate a per-session CSRF token on all mutating endpoints using the existing isGlobalTokenValid() / getToken() helpers (objects/functions.php:2313), rejecting requests whose globalToken is missing or invalid.
  1. As defense in depth, set the session cookie with SameSite=Lax (or Strict) in the AVideo session initialization, so cross-site navigational GETs do not carry the session cookie even if a handler regresses.

Applying (1) alone closes all three reported variants; (2)–(4) harden the surface against variants of the same pattern in other objects/*.json.php handlers.

Sources & licences