What problems can arise when parameters are spliced into the action name, and how can such name splicing be self-checked?
What problems may arise when request parameters are concatenated into internal action names or hooks, and how should the site self-check? It will trigger an action that was not intended to be exposed: the name is made up, and any input that can form a valid name can be hung on other processing logic.The WordPress system has fixed this type in the security maintenance version in October 2026: The parameters passed to the hook of combining status and type can be forged, leading to conflicts in action names, reported by Alex Concha from the WordPress security team.The announcement only wrote the cause and result, without specifying the specific exploitation method, self-check by cause is sufficient.
Why might splicing names lead to unauthorized access
The common form of internal action name is「status plus type」or「object plus action」, connected by a separator. Generate the name according to this rule when registering listeners, and拼出 the same rule when calling——it looks symmetrical and convenient.
The value on the calling side comes from the request. If the parameters can directly affect the name being拼出来的,the caller is choosing 'which registered process to go'. The listening registry is often much larger than the external interface: internal cleaning, state rollback, batch recalculation and other actions are all included in it, which were originally assumed to be called only by the system internally, without secondary authentication.
Overriding is not obtained by bypassing the check, but by the fact that 'this name can be called from the outside'. This is the most typical consequence of concatenation writing.
Is the conflict of action names the same as parameter injection?
It is not the same thing, but the cause is the same. Parameter injection is where the value is treated as code execution, and action name conflict is where the value is treated as a routing identifier. The former often results in the data layer, while the latter often results in the behavior layer.
The common point between the two is that concatenation occurs before validation or there is no validation at all. Therefore, the approach is also the same - it is not to escape the concatenation, but to enumerate the permissible values.
The same type of repair in the self-owned system can be used as a reference: One of the high-risk issues fixed in AnQiCMS v3.6.6 is that the list sorting parameters are拼进 query statements, another is that the login credentials can be forged during site switching, based on the issuance method of one-time tickets; The upgrade recommendations also require the rotation of the server signature key and the modification of the administrator's password. Sorting parameters and concatenation are at two different levels (query statements and action names), but the risk model is consistent: the parameter that should be an enumeration value is treated as a free string.
How to investigate the three types of concatenation points within the site
The first category is hooks and action names. Search all the positions where the variable **name template is located. If any part comes from the request, it should be listed for correction.
The second category is routing and page identifiers. Writing styles like 'Generate template name by parameters' and 'Choose processing branch by parameters' have similar consequences and conflicts with action names, the difference being the processing range that can be reached. The troubleshooting method is the same: the template name and branch identifier must be decided by the whitelist.
The third category is query construction. Sorting fields, table aliases, and state filtering parameters, if directly concatenated, become data layer issues. This category should be handled parameterized, not by character filtering——filtering is always less than whitelist.
After checking the three categories, put the results in a table: parameter name, allowed values, validation position, and whether there is a whitelist. The table is easier to follow than code comments when making changes next time.
The document status and type parameters should be validated by whitelist.
Status and type are the most common two concatenation sections and are most easily treated as free strings. This is because these two look 'how to pass it all' on the interface.
For example, the status of documents within the station itself is a finite set: formal documents, drafts, pending release, and recycling station. AnQiCMS handles it in this way - the draft link with a preview mark can be previewed, and deleting a formal document is moved to the recycling station instead of being physically deleted. Since the values are fixed, the validation should be done by enumeration: values not in the set should be directly rejected instead of being拼进名字后看会不会命中。
The same goes for the type field. The type identifier under the custom content model is defined by the backend, and there is no reason for the frontend request to bring in any type.
Note two points when writing a validation function: the whitelist should be placed in the service layer instead of just in the controller; rejection should produce a clear error instead of 'nothing happens' — 'nothing happens' can mislead troubleshooters into thinking the logic is malfunctioning.
Common questions
Is it okay to just change the escape character?No. Escaping cannot prevent the occurrence of other valid names concatenated legally, conflicts will still happen. What needs to be prevented is the range of optional values.
Should all internal actions be included?It is recommended to collect according to accessibility: only whitelist actions at externally accessible entries should be retained, and internal actions should be called by the system. Once the range is narrowed, the consequence of misspelling names will degenerate from over-authorization to not finding the action.
How to confirm whether the historical version has been called in this way?The most convenient way to check the distribution of parameter values in the log is to list the unique values of the state and type parameters. If there are values outside the set, it means that someone has called it in this way or has tried it before.
What should be done after the repair is launched?Implement according to the announcement. Both the rotation of the server signature key and the modification of the administrator password have been written; both must be completed; only replacing the code without rotation, the risk of credentials still remains.