Upgrade precautions for AnQiCMS v3.6.6: SQL injection needs to be upgraded as soon as possible, as well as the two required settings in MCP backend configuration
Published on October 09, 2026
This is not the update log (see the update content in 'AnQiCMS - AnQiCMS v3.6.6 Update Log (merged v3.6.5)' ), it only talks about three things:Why is it recommended to upgrade as soon as possible this time/Two things to do immediately after the upgrade/How to configure the backend after this big change of MCP.
1. Security Fix: Do not wait this time, upgrade as soon as possible
v3.6.5 fixed two high-risk issues that directly affect the database content and backend login security. Both can only be cured on the server side,There is no configuration switch that can be bypassed, so the only way to deal with it is to upgrade.
1. List sorting parameters exist SQL injection risk (the most extensive impact, priority handling)
- Risk: The sorting parameters of list queries were previously directly spliced into the query statement, and constructing special sorting values could read database content, including the password hash of the administrator account.
- Current situation: The new version has changed to a strict field name whitelist - only recognize the actual column names in the database and the ascending/descending writing style, and discard the rest and fall back to the default sorting.
- What you need to do: Upgrade to v3.6.5 and above; and conduct a self-check for intrusion in accordance with the third section.
2. The login credentials for inter-site jump login can be forged
- RiskThe 'jump login' credential between multiple sites, the signature method depends on password hash and a random string that can be generated by the caller, the ticket never expires, and does not check account status or error count. Once the password hash leaks, it is equivalent to obtaining the credentials for long-term password-free login to the background.
- Current situationChanged to a one-time credential issued by the server——the key is changed to the site's own TokenSecret, valid for 120 seconds and expires after use, and cannot be issued as a long-term credential; at the same time, account status verification and IP error count locking shared with password login are added.
- What you need to doIn addition to the upgrade,it mustComplete the following two actions, otherwise the risk will not be eliminated.
Second, be sure to complete these two things after the upgrade.
There is no 'revocation' mechanism in the administrator credentials. If the site has been attacked, the session obtained by the attacker has alreadywill not be invalidated due to the upgrade.. So:
- Rotate TokenSecret: Update each site individually
websitesof the tabletoken_secretfield (for multi-site deployment, each site needs to be changed). After changing the login status of all sites will be invalidated, and you will need to log in again, this is a normal phenomenon, not an upgrade error. - Change all administrator passwords: Not just your own super administrator, but alsoallAdministrator accounts, including those left by long-term unused, outsourced, or former colleagues. It is recommended to delete accounts that are no longer in use and check whether the permissions of the administrator groups have been changed.
If it is temporarily impossible to upgrade: The vulnerability entry is on the list interface with sorting parameters. You can first intercept rules for these parameters (only allow common sorting formats) at the WAF or Nginx layer and tighten the access source to the background and interface at the firewall layer. This is just a temporary measure and cannot replace the upgrade.order/sortThese parameters do rule blocking (only allow common sorting formats), and tighten the access source to the background and interface at the firewall layer. This is just a temporary measure and cannot replace the upgrade.
III. Self-inspection list for being attacked
Before changing the password, make sure it hasn't been used before, otherwise you may leave a backdoor:
- Check the backgroundAdministrator login logwithOperation log: Are there any abnormal IPs, abnormal periods, or records of unauthorized operations (the new version will record the login time as truthfully as possible).
- CheckAdministrator list: Are there any new unfamiliar accounts, or have the administrator group permissions been relaxed?
- CheckContent and template: Are there any newly added documents in bulk, hidden pages or redirects, or modified template files (especially check for external links or scripts).
- CheckDatabase and scheduling taskAre there any unfamiliar tables or unexpected scheduled tasks?
- In the event of an intrusion, handle it in the following order: 'Clear backdoors → Change TokenSecret → Change all admin passwords → Rebuild admin accounts'; it is more reliable to restore from a known clean backup if you are not sure whether the cleanup is thorough enough.
Two more credential leak issues (interface echo of database password for site details and API exposure of SMTP authorization code) have also been fixed in this version. If your SMTP authorization code has been read by the interface, it is recommended to generate a new authorization code on the email service provider side as well.
Four, MCP this is a big change
If you are using third-party AI clients like Claude Desktop, Cursor, Cherry Studio to take over sites, there are significant changes after this upgrade, get to know them before configuring:
- Tools are reorganized by 'intention': It is no longer a collection of scattered ability interfaces, but is condensed into a directory according to business intent (currently 49 items, such as document lifecycle, management categories/labels/single pages/models, robots/sitemap/push, backup and recovery, etc.). Sites can choose which ones to open, and this site currently opens 28 items.
- One approval replaces breaking in detail: Multiple write operations in the same round are merged into one confirmation, read operations no longer disturb you; but sensitive paths such as deletion, changing passwords, and database migration are still confirmed sequentially.
- No need to transmit the entire content to change it.Update documents, categories, etc. Only the fields you pass in will be covered, and the text, cover, categories, and tags not passed in will automatically continue to use the original values and will not be cleared. It's safer to batch change titles.
- The call is rejected and you can see the reason.Before, it would only report 'The call was not completed', but now it will return the Chinese reason and what to do next, so you don't have to guess when troubleshooting configuration issues.
- New capabilityEmail subscription and mass sending (mass sending is an asynchronous task and will return a task number for polling progress), inquiry of留言列表, direct upload of attachments in base64 image format, sensitive words replaced by keywords, template attachment tag,
jsonFilter's encode/decode, built-in file search of**Recursive wildcard.
Compatibility issues to note: Historical tool names will be automatically mapped to the corresponding intent, but if you have manually saved old call configurations or custom skills in your client, it is recommended to pull the tool list again after the upgrade to check; please use intent names uniformly in skill text.
5. MCP backend configuration entry and the meaning of each item
Entry:Backend → Settings → AI unified configuration → 「MCP Open Interface」tab.
| Configuration item | function | Suggestion |
|---|---|---|
| Enable MCP Open Interface | Master switch, when turned off, third-party AI can not access completely | Only open when necessary |
| Authentication Token | Third-party calls need to be carried in the HeaderAuthorization: Bearer '<token>' |
Click 'Generate Random Token', keep it after generation; regenerate if leaked |
| Rate limit (times/minute) | Prevent AI from overloading the service, 0 for no limit | Enter a non-zero value, do not leave 0 |
| Tools allowed to be used | Determine which tools can be seen in the tool list | Leave blank = all common tools; fill in*= All dangerous tools; you can also specify only a few (separated by English commas), or fill in the entire category likecontent/seo |
Dangerous tools (backup, upgrade, delete, etc.)Default not open, must be manually added to the above column to be available. The page lists the list of available tools on this site, click on the tool name to add, hover to see the description and risk level. After configuration, use 'One-click copy configuration' to hand over the client configuration to the third-party tool.
Six, two places that must be explicitly set (easiest to miss, missing the entire MCP will not be available)
This section is the most needed to read after the old site upgrade.
- Interface call identity:Which administrator identity is used when the AI calls the website interface. When 'Not Open' is selected, the AI cannot call any backend interfaces. When entering the new configuration page for the first time, the first administrator is pre-selected by default. Confirm it if it is correct; if your interface still shows 'Not Open', please select one manually.
- Scope of interface open:Determines the types of operations the AI can perform on the website—
- Closed (AI cannot access data)
- Read-only (can only view)
- Read + Write (default, recommended):Can be viewed, as well as new and modified
- All (including delete, cautious to enable)
Key point: both of these items must be selected and saved on the page before taking effect.The backend configuration interface has set them as required, providing suggested default values (read + write, pre-select the first administrator), the new site can be used after the first save; if you still see the old interface, without any pre-selected options, you will need to select them explicitly once.Sites that have never saved MCP settings are still in a conservative state of 'not allowing access to any interfaces' on the server.-- This is a safety net, not because the upgrade has not taken effect. So: after the upgrade, open this tab, confirm these two items, and click save once.
The configuration takes effect immediately after saving, no need to restart the service; if it doesn't take effect, restart it once to confirm.
How can you judge if you have missed an item:
| Phenomenon | Reason | processing |
|---|---|---|
| The tool can be seen in the list, but it returns 'Not in the open range' when called | The interface open range is still closed | Change it to 'Read-only' or 'Read + Write' and save |
| All interface calls are rejected, prompting for missing call identity | The interface call identity is 'Not open' | Select an administrator and save |
| You can't even see the tool in the client | The master switch is not enabled, or the Token is incorrect | Check the enabled status and the Token in the Header |
| The tool is visible and can be read, but write operations are all rejected | The scope is only given to 'read-only', or the tool has not been added to 'tools allowed to use' | Adjust as needed to 'read + write', dangerous tools need to be added manually |
| Wants to delete data but is always blocked | Not opened to 'all', or the operation belongs to an unauthorized dangerous tool | Confirm whether it is really necessary to open deletion, it is recommended to be executed manually in the background |
What is the appropriate level of openness?Using 'Read + Write' is enough for daily content operation. It involves membership and orders, data migration, backup and recovery, and version upgrades. It is recommended not to keep it open for a long time, but to open it temporarily when needed and then take it back; backend administrator operations only provide viewing, and accounts and permissions are not modified through AI.
7. Recommended upgrade order
- Backup firstDatabase backup + site file backup (the backup after this upgrade has covered static files and more data tables).
- Upgrade nextBackend version check and upgrade, or restart the service after replacing the program; upgrade each site one by one, do not only upgrade the main site.
- Rebuild cacheAfter upgrading, rebuild the HTML static cache, rebuild the full-text search as needed, and then confirm the front-end page is normal.
- Perform security actionsAfter upgrading, rotate TokenSecret, change all administrator passwords (see Section 2), and check yourself according to Section 3 if you have any doubts.
- Configure MCPFor AI use, configure and save according to Sections 5 and 6 once.
Chapter 8, Summary
- The core of this upgrade isSafetyAfter upgrading, SQL injection and login credential forgery must be repaired on the server side, and can only rely on upgrading; remember to change TokenSecret and all administrator passwords after upgrading.
- Another major change of this upgrade isMCP: The tool rebuilds, approves, and updates semantics more friendly, and the reasons for rejection are readable.
- Whether MCP can be used depends onInterface call identityandScope of interface openWhether these two items have been explicitly saved.
Welcome to post in this category if you encounter phenomena and errors during the configuration process, and paste the complete cause text together to locate it faster.