Summary
DedeCMS v5.7.118 contains a Cross-Site Request Forgery (CSRF) vulnerability in the /sys_task_add.php endpoint, which handles the creation of system tasks.
If an authenticated administrator is tricked into visiting a malicious page, an attacker can silently submit forged requests, potentially creating or altering scheduled tasks within the CMS.
Affected context
The vulnerability occurs in DedeCMS v5.7.118 within the administrative functionality exposed by /sys_task_add.php.
It is relevant when:
- Administrators are authenticated to the DedeCMS backend using cookies or similar session mechanisms.
- The task creation endpoint accepts state-changing POST/GET requests without robust CSRF protections such as non-guessable tokens tied to the user session.
- Administrators browse other, potentially malicious websites or content in the same browser while logged in to DedeCMS.
Exploit preconditions
- Attack surface: Web browser of a logged-in DedeCMS administrator.
- Required access: The attacker must cause an authenticated administrator to load attacker-controlled HTML or script (e.g., via phishing, malicious ads, or compromised sites).
- Trigger point: A crafted HTTP request (typically an auto-submitting form, image, or script) is sent to /sys_task_add.php using the victim's existing session cookies.
- Why exploitation is possible: The endpoint that adds system tasks does not sufficiently verify that the request originated from a legitimate interaction within the DedeCMS interface (e.g., lacks CSRF tokens or origin checks), so the application cannot distinguish between genuine and forged requests.
Why this happens
This issue is rooted in insufficient request origin validation for a sensitive, state-changing operation, aligning with CWE-352 (Cross-Site Request Forgery).
The /sys_task_add.php endpoint relies solely on ambient authentication (session cookies) and does not require a per-request, unpredictable token or equivalent mechanism to prove user intent.
As a result, browsers automatically attach valid session credentials to attacker-initiated requests, and the server processes them as if initiated by the administrator, enabling unauthorized task creation.
Potential impact
- An attacker could create new scheduled tasks that perform unwanted operations within the CMS.
- Malicious tasks may be configured to execute server-side scripts or maintenance actions at attacker-controlled times.
- Administrative workflows and content publishing schedules could be manipulated or disrupted.
- Depending on how tasks are executed, this could facilitate further privilege abuse or data tampering within the application.
General mitigation guidance
Effective mitigation typically focuses on enforcing strong anti-CSRF protections around all state-changing administrative endpoints:
- Introduce cryptographically strong, per-session or per-request CSRF tokens that are validated server-side and bound to user actions in the admin interface.
- Employ double-submit cookie or same-site cookie strategies as a defense-in-depth measure to limit cross-origin request capabilities.
- Validate the Origin and Referer headers for administrative actions where feasible, rejecting requests that do not originate from trusted domains.
- Limit the exposure of sensitive administrative functions and ensure that only authenticated administrators can reach them, ideally via separate admin paths or environments.
- Encourage operational practices where administrators use dedicated browsers or profiles for admin tasks to reduce blended browsing risks.
How teams detect issues like this
Detection focuses on identifying unprotected state-changing endpoints and monitoring for anomalous usage:
- Use static analysis or code review checklists to flag administrative handlers that change application state and do not validate CSRF tokens or request origins.
- Search code for forms or AJAX requests targeting /sys_task_add.php (and similar endpoints) that lack embedded CSRF tokens or server-side validation logic.
- Implement application-level logging for task creation events, including source IP, user identity, and user agent; monitor for unusual patterns such as bursts of task additions or activity outside normal admin workflows.
- Incorporate security testing (e.g., manual penetration tests or automated scanners) specifically configured to probe for CSRF on critical admin endpoints.

