Summary
Easy!Appointments versions 1.5.2 and earlier implement CSRF checks only for POST requests, while several sensitive operations are exposed via GET or $_REQUEST parameters without equivalent protection.
An attacker can trick a logged-in administrator into loading a crafted URL, leading the victim's browser to perform unintended actions such as creating new admin users or changing admin credentials.
Affected context
This vulnerability affects Easy!Appointments deployments where:
- The application is accessible via a web browser over HTTP/HTTPS
- Administrators or privileged users remain logged in while browsing other sites
- State-changing endpoints accept parameters via GET or $_REQUEST
The issue resides in application/core/EA_Security.php::csrf_verify(), which only enforces CSRF checks for POST requests and returns early for other HTTP methods, leaving sensitive GET-based actions unprotected.
Exploit preconditions
- Attack surface: Web-facing Easy!Appointments instance reachable by victims' browsers.
- Required access: Attacker needs no authentication but must be able to cause a logged-in admin (or privileged user) to visit or load a crafted URL (e.g., via link, image, script, iframe, or redirect on a malicious or compromised site).
- Victim state: Victim must be authenticated to Easy!Appointments with a valid session cookie stored in the browser.
- Trigger point: A state-changing endpoint that:
- Accepts action parameters via GET or $_REQUEST, and
- Is only protected by CSRF checks for POST requests.
- Why exploitation is possible: The CSRF verification logic short-circuits for non-POST methods, so browsers automatically attach valid session cookies to crafted GET requests, and the application trusts these requests as if they originated from the legitimate user.
Why this happens
The root cause is incomplete CSRF enforcement in the request handling pipeline, mapped to CWE-352: Cross-Site Request Forgery (CSRF).
The function csrf_verify() in EA_Security.php validates CSRF tokens only for POST requests and explicitly returns early for non-POST methods. At the same time, various sensitive actions (e.g., creating administrator accounts, updating admin email/password) are implemented as state-changing operations that accept input via GET or the broader $_REQUEST superglobal.
This creates an insecure pattern where:
- Trust in the presence of a valid session is conflated with user intent, and
- The assumption that only POST requests perform state changes is violated by actual code paths.
As a result, standard browser behavior—automatically sending cookies on cross-site requests—can be abused to perform authenticated actions without explicit user interaction or token confirmation.
Potential impact
- Creation of new administrator accounts under attacker control
- Modification of existing administrator email addresses
- Modification of administrator passwords
- Full administrative account takeover and loss of control over the Easy!Appointments instance
- Unauthorized configuration changes and manipulation of appointment data
- Potential staging point for further compromise of integrated systems or user data
General mitigation guidance
Effective mitigation focuses on enforcing CSRF protections consistently and aligning HTTP methods with operation semantics:
- Apply CSRF verification uniformly to all state-changing operations, regardless of HTTP method (POST, PUT, DELETE, and any GET that mutates state).
- Refactor state-changing endpoints to use non-idempotent methods (e.g., POST/PUT/DELETE) instead of GET, ensuring that GET remains read-only wherever possible.
- Bind CSRF tokens to user sessions and validate them using a "synchronizer token" or double-submit cookie pattern for all privileged actions.
- Reduce the attack surface by consolidating sensitive operations behind a small number of well-audited endpoints with consistent security checks.
- Limit the privileges associated with any given account where feasible, constraining the impact if a CSRF attack does occur.
- Consider adding secondary confirmation steps (e.g., re-authentication or confirmation dialogs) for especially sensitive operations like changing admin credentials.
How teams detect issues like this
Detection typically involves reviewing both code flow and request handling patterns:
- Static analysis / code scanning:
- Search for state-changing operations (e.g., account creation, email/password updates, configuration changes) that:
- Accept parameters from
$_GETor$_REQUEST, and - Do not call or enforce CSRF validation logic.
- Identify CSRF verification routines that are conditionally applied only for specific HTTP methods.
- Code review signals:
- Endpoints that modify database records but are wired to routes accepting GET requests.
- Security middleware or helpers that early-return or bypass checks for non-POST methods.
- Inconsistent use of CSRF tokens across different controllers or views.
- Policy and automated checks:
- Enforce internal guidelines that disallow state-changing logic in GET handlers.
- Use automated review tools or linters to flag controllers that perform writes without invoking CSRF checks.
- Incorporate security tests in CI that simulate cross-site GET requests to known sensitive endpoints to verify that CSRF protections are enforced.

