v3.6.6 security update details: fixed sorting parameter injection and credential forgery issues.
The Anqi CMS version 3.6.6 was released on October 8, 2026. This update focuses on security reinforcement and fixes two high-risk vulnerabilities: SQL injection risk in list sorting parameters, and the issue that login credentials can be forged when switching sites. Sites that have completed the upgrade need to perform two follow-up operations: rotate the site switching key, and change the passwords of all administrator accounts to eliminate potential security risks.
The principle of SQL injection vulnerability in sorting parameters
In the scenario of querying the data list, users can specify the sorting field and direction through URL parameters, for example?order=created_at&direction=desc. If the backend directly concatenates the sorting value passed by the user to the SQL statement, the attacker can construct malicious input such asorder=id; DROP TABLE users--, resulting in the database executing unexpected dangerous instructions.
The v3.6.6 version adds a whitelist verification mechanism for sorting parameters, allowing only predefined field names to participate in the sorting logic, and illegal inputs will be directly rejected. At the same time, the underlying query builder has been changed to use parameterized binding, blocking the possible path of SQL injection at the root. This fix does not affect existing functionality, but will change the response behavior to exceptional parameters: previously, it may return error details, but now it will uniformly return general prompts to avoid leaking database structure information.
The risk of login credential forgery when switching sites
In a multi-site deployment architecture, administrators can quickly switch between sites without having to log in repeatedly. This convenient feature relies on a single-use token mechanism: when a user initiates a switch request from the source site, the system generates a short-term valid token, and the target site validates the token to establish a session.
The vulnerability in previous versions lies in that if an attacker can intercept or guess the generation pattern of the token, they can forge a legitimate switch request, bypass identity verification, and directly enter the background. Version 3.6.6 has reconstructed the token generation algorithm, introducing stronger random entropy sources and time constraints, making brute-force attacks impossible within the actual time window. At the same time, the server has added tracking of the token usage status, and the same token becomes invalid immediately after consumption to prevent replay attacks.
Necessary operations after the upgrade
After completing the code upgrade, you must perform the following two steps to completely eliminate the impact of the old vulnerabilities:
The first step is to rotate the site switching key. A new key value is generated in the system settings key management area, the old key will continue to be valid for 120 seconds during the grace period to ensure that the ongoing switching operation is not interrupted. After the grace period ends, all tokens issued based on the old key will immediately expire.
Step two, change the passwords of all administrator accounts. Although the vulnerability itself does not directly leak password hashes, to prevent potential credential abuse, it is recommended to update all administrator passwords to a strong combination (including uppercase and lowercase letters, numbers, and special characters, with a length of no less than 12 characters). If two-factor authentication is enabled, this step can be appropriately relaxed, but it is still recommended to change passwords regularly.
Scope of Impact Assessment
These two vulnerabilities mainly affect deployments that have enabled the multi-site feature and exposed the management entrance to the outside. Sites in single-site mode or those without the site switching function are less affected by the second vulnerability, but it is still recommended to apply the patch for sorting parameters, as list queries are a general function of the backend.
For sites that have already passed the firewall rules to limit the management entry IP range, the external attack surface is relatively controllable, but internal threats (such as users with partial permissions trying to escalate privileges) still need to be defended through code-level fixes. It is recommended that all sites running versions before v3.6.6 upgrade as soon as possible, especially those carrying sensitive data or providing public services.
Common questions
How can you confirm that the current version has applied the fix?
After logging into the backend, check the "About System" page. The version number should display as 3.6.6 or higher. You can also check the header records of the CHANGELOG.md file to confirm that it contains the two update notes "Fixed list sorting parameter SQL injection" and "Fixed site switching login credentials can be forged". If you cannot access the backend, you can query the version constant value in the config/constant.go file through the command line.
Will the key rotation for site switching cause the existing session to expire?
I will not. The site switch key is only used to issue new switch tokens and does not affect established active sessions. Administrators can still operate the system normally after rotating the key, and the new key will only be used to sign the new key when the site switch is initiated actively. The 120-second grace period design is to ensure that there is enough time for ongoing operations to complete and will not be interrupted due to key switching.
What are the consequences if you forget to change the administrator's password?
The old password can still be used normally after the upgrade, but if an attacker has previously obtained the password hash through other means and the hash can be reversed or exploited, there is still a risk of being misused. The purpose of changing the password is to cut off this potential attack chain. If it is not possible to coordinate all administrators to change their passwords at this time, at least the site switching key rotation should be completed first, and then arrange the subsequent password update plan.