Summary
Before version 6.2, state-changing HortusFox admin routes could accept GET requests, and the affected controller did not validate CSRF tokens. If a signed-in administrator is induced to follow a cross-site link, an attacker may cause privileged actions to be performed; browser behavior and session timing can affect exploitability.
Affected context
The issue affects HortusFox installations before 6.2 where state-changing routes in app/config/routes.php accept GET requests and the corresponding AdminController actions do not validate CSRF tokens. Actions described as affected include changing environment settings, deleting users or locations, managing API keys, and clearing cached data. Version 6.2 mitigates the documented GET path, but a complete anti-CSRF fix is not documented.
Exploit preconditions
- Attack surface: Cross-site requests to state-changing HortusFox admin routes
- Required access: The victim must be a signed-in administrator; the attacker does not need an account
- Trigger point: The administrator is induced to open a cross-site link or otherwise submit a cross-site request
- Why exploitation is possible: Affected actions accept requests without CSRF-token validation. Browser cookie policies and session timing can limit or change which requests succeed; the tested cross-site POST behavior was possible within Chromium's approximately two-minute Lax+POST grace period after login, but not with an aged cookie.
Why this happens
The application permits state changes through routes that accept GET requests and does not use Asatru\Controller\PostValidator in the affected controller to verify CSRF tokens. This is a CWE-352: Cross-Site Request Forgery (CSRF) pattern: a browser may attach a victim's authenticated session to a request initiated by another site, allowing an action to be attributed to the victim. CWE-650 is also associated with the vulnerability.
Potential impact
- An attacker may change environment settings through the victim's administrator session.
- Users or locations could be deleted.
- API keys could be managed or cached data could be cleared.
- A user account could be promoted, depending on the route and browser conditions.
General mitigation guidance
Common defensive patterns include:
- Require non-GET methods for all state-changing actions and keep GET requests read-only.
- Validate unpredictable, session-bound CSRF tokens on state-changing requests.
- Apply appropriate SameSite cookie settings as an additional layer, not as a replacement for token validation.
- Check authorization and validate the requested action on the server for every route.
- Limit administrator privileges and protect sensitive actions with additional confirmation or reauthentication where appropriate.
How teams detect issues like this
Review route definitions and controller actions for state changes reachable through GET, and check whether every state-changing request verifies a CSRF token. Static analysis and code review can flag missing token-validation calls, unsafe HTTP-method mappings, and admin actions that rely only on ambient session cookies. Policy checks can require non-GET methods and CSRF defenses for state-changing routes; browser-based testing can help verify behavior across cookie policies and session states.

