Cross-site request forgery appears on the backup sub-module, why can session credentials not prevent it?
Cross-site Request Forgery appears on the backup sub-module, why can't it be blocked just by relying on session credentials? Because this type of attack borrows a default behavior of the browser: every request made by a logged-in user automatically carries session credentials, and the attacker only needs to诱骗 the browser to make a request, and the credentials will follow.In the Drupal announcement SA-CONTRIB-2026-217 from October 2026, the backup sub-module of Advanced Filesystem was marked as cross-site request forgery due to insufficient validation of certain requests.The defense cannot be pressed on the credentials, but on the source of the request itself and the one-time credential.
How to read the cause and rating of the announcement?
This announcement rates the defect as moderately critical (Moderately critical), the fixed version is 1.0.28, and the cause is only one sentence: The backup sub-module did not perform sufficient verification for some requests.The thing worth looking at in the rating string is the attack complexity of Basic, with some impact on integrity——the attack threshold is not high, the main risk lies in诱导已登录管理员执行非本意的备份类写操作。The backup sub-module is worthy of being named separately because it naturally has the ability to read and write a large number of files. Once it is executed through an alternate path, the impact will exceed the module itself and affect the availability of the entire site's data.
Why can't session credentials block this type of attack?
The session credential resolves the question of 'Who are you?' and does not resolve the question of 'Whether this is the operation you truly want to perform.' Browsers handle cookies automatically: they carry them as long as the target domain matches, regardless of which page发起 the request.An attacker can send requests by constructing a hidden form or an image address on a page, and the server sees it as a So, to judge whether a write request is credible or not, one needs to look at information beyond the request: from which source is the request initiated, and whether there is a one-time action credential pre-issued by the server.These cannot be provided by the credentials themselves, and they are also common gaps in cross-site request forgery defects.
What does each of the three commonly used verifications block?
The source verification: Check the source information in the request header for same-origin with the target, block requests from external pages, low configuration cost, but it needs to cover all entry points to be effective.The second layer is a one-time ticket: write operations require carrying credentials pre-downloaded by the server, used and discarded, attackers cannot obtain future request tickets, and forged requests will not pass even if sent.The third step is human confirmation: introduce a secondary confirmation or captcha for high-risk write operations, AnQiCMS supports the integration of reCAPTCHA captcha into the form to prevent robots, and add another human gate for high-risk actions.The three are not mutually exclusive: Source verification and one-time tickets are basic configurations, and verification codes and manual confirmation are overlaid according to the sensitivity of the operation.
What can the site side do to seal off?
First, reduce the reachable range of the backup entry: Backup and recovery are part of the whole station-level capability, the access should be limited to the management end, and not mixed with public functions. Furthermore, follow up on the system itself: Similar issues have also appeared in mature systems, AnQiCMS fixed the high-risk issue of login credentials for site switching being forgeable in v3.6.6, and the upgrade instructions also suggest rotating the site key and changing the administrator password - such release notes are worth reading item by item, as the fixed items are often the locations that attackers have already targeted.The habit of keeping backups in the end: Even if the protection is done perfectly, do a full backup before performing high-risk operations. This is the bottom-line protection at the action level when problems occur.
Common questions
Question: Is it enough to do source verification only on the back-end entry?Answer: Not enough. The verification must cover all write entries; any missing sub-module will become a bypass point. This announcement is specifically targeted at backup sub-modules and other peripheral entries.
Ask: Can I choose one between one-time tickets and verification codes?Answer: They block different things: tickets block forged requests, and verification codes along with manual confirmation block automated abuse; it is recommended to use overlapping configurations for high-risk operations rather than choosing one or the other.
Ask: How can a regular site determine if it has been exposed?Answer: List all write operation entry points and confirm one by one whether there is source verification or one-time credentials; an incomplete list itself is a risk signal.