The page cache is executed as a script, and the problem lies in parameter encoding or the cache directory
The page cache file is being executed as a script; it is not a single point of failure. It is the result of both links being breached simultaneously: the first allows attack content to be written into the cache, and the second allows this cache to be interpreted and executed. Just fixing parameter encoding or just fixing directory permissions will not stop the entire chain
Why does the cache key include external input
The common practice of static caching is to map the request path to a filename and send the file directly if a hit is found. The problem arises when external parameters are literally拼进了键里。A fix record in the peer system explains the cause very specifically: PbootCMS in the V3.2.24 update log on September 1, 2026, clearly stated that the problem of front-end pagination parameter encoding and query separator bypassing causing HTML cache poisoning and cache files being executed as scripts has been fixed.
There are two types of bypass. One is encoding difference: the same value goes through different percent-encoded forms and is not equal in string comparison, so it is considered as two different pages, one of which can control the cached content. The other is delimiter: the delimiter of the query string is not escaped, and after being spliced into the filename, it changes the path ownership, causing the write to fall into an unexpected position.
Two types of bypass: encoding and delimiter.
The correct processing order is to normalize the parameters first, then generate the key. Normalization means decoding according to the same set of rules, rejecting illegal characters, and finally using a stable hash value as the filename, rather than taking the user input directly as a path segment. This way, even if the input form varies, it still points to the same key, and it is not possible to have 'same key, different page' or treat separators as directory separators.
The trouble of 'same key, different page' is not just about hit rate: once the correspondence between cached content and request path is broken, the content displayed is no longer what the path should have, and poisoning can persist on the page.
The disk location and execution permissions
The second problem is at the file level. If the cache directory is processed as a script by the Web server, any file written to the directory will obtain execution capabilities. The approach to closing is to separate the write directory from the executable directory: the cache is only read as data by the program, not addressed directly through URL; script parsing is closed at the directory level, and a separate denial rule is set up if necessary.
This step and the protection of the content layer are two separate lines. The sensitive word filtering and content review within the station act on the incoming text, preventing content issues at the text level; interface authentication and injection protection follow the request processing chain. The execution issues at the file level cannot be blocked by all three, and must be solved at the deployment and directory permission level.
The four segments of the station's intake
It will be clearer to arrange it by link. **The section is routing and pseudo-static rules: the rewritten path determines the input of the cache key, and after the rules are changed, the generation method of the key should be checked again to avoid directly splicing the rewritten parameters in. The second section is the generation of the key: normalize the input, reject illegal characters, and use unpredictable filenames. The third section is writing: only write to the data directory, and verify that the target path is still within the expected range. The fourth section is execution: the cache path does not accept script parsing, and this restriction is written in the deployment configuration rather than by convention.
Check in reverse order as well: first confirm if the directory can still be executed, then confirm if the write path can be controlled externally, then confirm if the key generation is standardized, and finally review the change records of the rules.
Common questions
Question: Can clearing the cache solve the problem?No. The content that has been poisoned is cleared, but the conditions for generation and execution are still in place, and it will reappear later.
Question: Why can it still be triggered after changing the permissions?If the cache key can still be controlled externally, the path of rewriting the page content is still valid, but it will no longer be executed directly.
Question: Should the staticization itself be stopped?Do not stop as a whole. The key is to change the generation method of keys and the disk location, so that staticization no longer depends on predictable filenames and executable directories.