The backup migration plugin was affected by a second injection, how to collect the attack surface in the import and export process?
The backup migration plugin was disclosed for a second SQL injection event, which is worth a second look by the site owner: The three pieces of information in the announcement are not light - trigger does not require login, hidden in the archive recovery function, rated 8.8.All-in-One WP Migration and Backup affected versions up to 7.109, fixed in 7.110, millions of installations.The trouble with SQL injection is that malicious content is first stored in the database, and then pieced together and executed when it is restored or read, while importing and exporting such 'trusted channels' are exactly the most easily overlooked entry points.The attack surface can be arranged in three steps: entry verification, parameterized execution, and backup file management.
The three key information in the announcement
The first is the trigger condition: Unauthenticated access means that the attack surface is hanging on the public path, independent of any backend account. The second is the location: The vulnerability is in the archive recovery function, that is, the section of 'restoring the backup'—almost all sites treat backup recovery as an internal action, rarely treating it as an external interface with protective measures.The third is the version range and the fix version: affected by versions 7.109 and earlier, fixed in 7.110, follow-up actions should be checked by version number, no need to wait for a second notification.These three combined form a typical pattern: low-frequency functions, high trust, publicly accessible, and the most easily overlooked in security reviews are these combinations.
Why is the second injection hidden in the archive recovery process
A single injection is input directly into the statement, both the defense and audit tools are watching the request parameters; a secondary injection is divided into two steps - first, store the dirty content in a legitimate form (write into backup archives, store in database fields), and then concatenate and execute when another function reads it.The scenario of archive recovery is 'reading historical data and trusting it': the recovery logic defaults to the content that was written in before, so it skips the escaping and parameterization processing of strings.To identify this kind of risk, the checkpoint is not 'does the entry have authentication', but 'which code paths consume historical stored data, and do they still treat input as input.'
The three channels that can be controlled in the import process
The first at the entrance: batch import function (supports ZIP compressed packages and Excel table formats such as archive formats) needs to verify the file ownership and operator identity, cooperate with request frequency control, and not allow anonymous access to the import port.The second layer in the execution layer: All queries拼凑 by imported data go through parameterized interfaces, implementing the principle of 'data is data, command is command' at the code level, which is an inherent defense against SQL injection and XSS attacks at this position.The third interface: Anqi CMS provides the /api/import/archive archive import interface, before batch writing, it first queries whether the title already exists to prevent duplicate imports and also makes the import action have a clear call interface for throttling and auditing, rather than scattered forms in the background.
Backup is not just backup without verification: recovery drill and static files
The other half of this event reminder is the backup itself. The backup range should cover data and static files, and the backup and recovery capabilities of Anqi CMS are designed according to this standard.But the backup file storage location must have access control - if the archive of the migration plugin falls into a predictable public path, it is equivalent to placing the 'material' for secondary injection outside.The recovery action needs to be practiced regularly: The practice not only verifies 'whether it can be restored', but also verifies 'which read and write paths the restoration process took', and these paths are exactly where secondary injection hides.The frequency of drills should be arranged once a quarter, what is important is to form a fixed rhythm of 'go through the recovery once, review the logs once.'
Common questions
Question: What should be done for the site that has not installed this plugin?Answer: Use it as a case study: list your own import and export feature list (backup, migration, archive recovery), check each one for authentication reachability, whether parameterized, this is more effective than focusing on a single CVE.
What is the difference in detection between second injection and first injection?The request audit cannot see it, the dirty content is legal at the moment of entering the database; detection should be placed on the path of consuming historical data, recovery, reports, and template rendering are all within the scope.
Can duplicate checking by title prevent injection in the import interface?Cannot prevent injection, but can narrow down accidental operations and repeated writing, making batch import auditable; injection defense relies on parameterized queries, and the two things should not be replaced by each other.