The page cache of domestic website building systems can also be executed by the code, how to view the list of historical version upgrades?
The page cache of domestic website building systems can also be executed as code, how to view the upgrade list of historical versions? The chain of such problems is: request parameters enter page rendering, the rendering result is written into HTML cache, and the cache file falls on a path that can be interpreted and executed, so the step of reading the cache is equivalent to executing the spliced content.The update log of PbootCMS on the day was checked, and the fix in V3.2.14 was for this link: the page parameter was reflected by the spider tag and written into the HTML cache, causing code execution. The handling method is to strip the script tags when writing to the cache.The upgrade list should be sorted by risk level, not read from top to bottom by date.
Why does the cache become an execution entry
Cache was originally the landing file for rendering results, and there are two conditions for the problem: the mixed-in controllable script tags in the write content, and the read path being interpreted as a program. Both conditions must be met for an attacker to not have to hit any interface directly, but to allow a normal visit to write malicious content into the cache, so that all subsequent visitors will read the same contaminated result. Therefore, the harm is at the site level, not just the page level.
Which type of repair on the list should be ranked first
Sort by whether it can directly cause code execution. The first tier is cache, template injection, and deserialization classes, which are equivalent to taking control of the site upon hit; the second tier is injection classes with unbound parameters in query conditions, the harm lies in data being read; the third tier is cross-site scripting and unauthorized access, the harm is in accounts and visitors; feature updates and experience optimization are ranked last. When multiple types of repairs are mixed in the same version, the urgency of the upgrade is determined by the most serious tier.
How to compare historical versions item by item
Not enough to just look at the latest version description, you need to look back according to the version number. The method is to first confirm your deployed version number, and then list all entries from your update log to the target version, marking three items for each entry: whether it involves the first and second levels above, whether additional configuration is required, and whether it affects the writing of the template or pseudo-static rules. If there is a version that must be configured in the middle, directly set the target to the latest, do not stop at an intermediate version.
What should be done before the upgrade action?
First, make a backup, including two copies of the database and static files, especially pay attention to the static directory for cache-related issues, the polluted cache files themselves are inside, and only backing up the database will leave dirty caches behind when restored. The second step is to verify the rendering results and list page sorting in the duplicate environment. The third step is to clear the cache and review the access performance of old addresses in production.
Which layer is reinforced daily?
The entry point of the code execution chain is closed by upgrading, and the visibility during runtime is controlled by another layer. The approach on the content system side is to integrate injection and cross-site scripting protection into the program, and at the same time, add anti-crawling interference codes to the page output, so that the batch搬运拿到的 is not clean text. This layer does not replace the patch, but only compresses the secondary loss after exploitation.
Common questions
Question: If the site does not open page caching, is it not involved in such issues?Answer: It still needs to be checked. Spider tags, template compilation, and statistical snapshots may generate similar landing files. The judgment basis is whether the description of the harm in the update log covers the features you have enabled, not whether you have actively enabled caching.
Question: What are the methods of temporary relief?Answer: Prohibit the execution permission of the cache directory on the interpreter side and clear out the existing cache to reduce the consequences that can be exploited. However, this is a reduction rather than a repair, and you still need to upgrade after the patch is available.
Question: How long should the upgrade list look back?Answer: At least cover all entries released after your current deployment version. If you stop at a long time ago version, the intermediate fixes may involve configuration changes, and you should check the configuration items in order.