Comments on private articles are read without authorization, and the permissions should be blocked at the list level or the detail level.

📅 2026-10-13 👁️ 16

Private post comments were accessed without authorization, mostly because permissions were only checked at the detail level and not at the list level. This is mentioned in the official security fix for WordPress 7.1.3: Unauthenticated disclosure of comments on private & unpublished posts. The lesson is that both the list and detail levels need to be blocked, and附属 resources are most likely to be overlooked.

Why are附属 resources most likely to be overlooked?

An article set to private, the main object itself is protected by permissions, and direct access will be blocked. But comments, attachments, and messages, which are 'hung below the main object', often have their own independent query entry points. Developers are easily default to protecting the subsets when adding permissions to the main object, but in fact, the visibility of the main object does not automatically pass down.

The attack path becomes simple: don't touch the article, directly request its comment list. If the comment interface only filters by 'article ID' and doesn't include 'whether the current user has the right to read this article' in the conditions, the comments of private articles can be read anonymously.附属 resources are the most often ignored layer in this model.

What kind of hole will be left if the permission is judged only at the detail level?

Judging the permission only at the detail level is equivalent to assuming that all visits will first fall on the detail page. But in the world of interfaces, list, search, batch, and embedded endpoints are all entry points that bypass the detail. As long as there is an unjudged entry, the privacy of the main object leaks through that crack.

Interception location Consequences of using alone
Judged only in the detail layer Entries such as list, search can be directly called, bypassing details to obtain subset data
Judged only in the list layer If the detail page uses a separate query, it may still return content that should not be given
Judged at both layers and defaults to reject No matter which entry is used, the permission must be confirmed again

The stable approach is to set the default behavior to reject: if there is no explicit authorization, return empty instead of default allowing and relying on individual pages for补救。Default rejection for unauthorized access issues is more stable than relying on individual interface supplement whitelist。“

What conditions should the list layer filtering take

The key to the list interface is to add the status of the main object and the current user's permissions to the query conditions, rather than just retrieve the subset by parent ID. Specifically, it needs to include three types of conditions: the visibility status of the main object to which this附属 resource belongs, the access rights of the current caller to the main object, and the publication status of the resource itself. All three conditions must be met before returning.

In other words, the comment list cannot simply ask 'What comments are under this article', but also ask 'Is this user qualified to read this article? If so, continue listing.' Integrating permission judgment into the query filtering rather than retrieving all and then reducing it in the display layer can prevent data from being seen during transmission or caching.

How do in-site permission groups and document states coordinate?

AnQiCMS uses two orthogonal lines to define the visible range: one is user management and VIP grouping, setting different access permissions for different user groups, determining what content the caller can see when the interface returns; the other is the document status - formal document, draft, pending publication, and recycling station. Drafts can have a preview tag for preview, but it does not mean it is open to everyone; deleting a formal document is moving it to the recycling station rather than a physical deletion, and the visible range also follows the status.

The two lines need to cooperate: when the interface returns subsets such as comments and attachments, first check whether the document status is visible to the public in the formal state, and then see if the user group of the caller has the right to access. If one condition is missing, it will not return. The identity layer is guarded by the built-in JWT authentication, first confirming who the caller is, and then discussing whether they can read. In this way, the main object and the附属 resources go through the same set of judgments, and there will be no misalignment such as 'the article is blocked, and the comments are missed.'

Common questions

What is the reason why comments are leaked separately when the article is already private?\nAnswer: Comments have an independent query entry, the visibility of the main object does not automatically pass to the subset, and the list interface needs to rejudge the permissions.

Is it enough to add permission judgment only on the detail page?\nAnswer: Not enough. The list, search, and batch entry can bypass the detail, and both levels should be judged and defaults should be rejected.

What should be paid attention to when setting the draft preview link?\nAnswer: The preview range should be defined separately, don't let it become readable to everyone, and the user group permissions should still take effect.

What is the most stable way to converge unauthorized access?\nAnswer: Write the status and the object's permission together into the query filter, and use default deny instead of a whitelist for each one.

Related articles

Why should the validation of reading and writing data be separated when a second injection occurs in the exported file?

WordPress 7.1.3 fixed a second SQL injection in the WXR export process. The characteristic of secondary injection is that it appears harmless when the data is stored, but becomes harmful when used again in the query. This article explains why import and verification should be considered separately, what to check during storage verification and output verification, and how to implement the two checkpoints of batch import within the site and content collection.

2026-10-13

Storage XSS appears on the comment management page, how did the script get into the background in the pending review comments.

WordPress 7.1.3 fixed a stored XSS vulnerability that could be triggered by pending review comments in the comment management page. This article explains why unreviewed content can still be rendered and executed in the background, the danger lies in treating comments as trusted data output, and the closing should be based on input verification and output escaping, and corresponding to the site's sensitive word filtering, content review and verification code protection.

2026-10-13

Can WordPress minor versions be directly updated automatically with 11 security fixes in one go?

This is a minor security update for WordPress 7.1.1 that includes 11 security fixes. The official recommendation is to update immediately, and sites that support automatic background updates will start updating automatically. This article explains which steps of the automatic update can be covered, and which situations require manual scheduling of the upgrade window, as well as the backup and credential rotation confirmation to be done before and after the update.

2026-10-13

The backend user deletion has been changed to POST submission and form credential verification, preventing which type of attack?

The content system has changed the user deletion and status switching to POST submission and form security credential verification in the version announcement to prevent cross-site request forgery from causing users to be mistakenly deleted or their status changed. This change blocks cross-site request forgery - attackers take advantage of the browser automatically carrying the login state. Moving the status change from GET to POST is just a **layer, and the real barrier to forgery is the credential verification that comes with the form.

2026-10-12

One update fixes seven security issues, should you upgrade first or check if you have been hacked first?

WordPress 7.1.3 brings 7 security fixes and recommends an immediate update. The sequence of handling depends on whether there are any signs of intrusion: if there are no signs, directly proceed to the upgrade window, if there are signs, only close the entry during the upgrade, and also handle the sessions and credentials that the attacker has obtained. This article takes the upgrade prompt of AnQiCMS v3.6.6 as an example to explain why it is necessary to rotate the keys and change the password together.

2026-10-13

Fixing only one severe vulnerability also requires a separate release, how does reading a local file escalate to remote code execution?

WordPress 7.1.2 is a separate release just to fix a severe level vulnerability: An unauthenticated attacker can allow the page template to parse any local PHP file outside the theme directory under certain conditions, and it becomes remote code execution when the server and theme prerequisites are met. This article analyzes the few steps from reading the file to executing the code, and corresponds to the on-site prevention of injection, backup, and credential rotation after upgrade.

2026-10-13

The page builder component can upload any file, and how the site is completely taken over step by step.

Singapore CSA Notice AL-2026-085 points out that two types of Joomla page builder components have high-risk arbitrary file upload vulnerabilities, which can lead to remote code execution and complete control of the site. This article analyzes the steps from uploading to taking control, and corresponds to the site's content review, anti-injection, and backup rollback, explaining the differences in handling component vulnerabilities and core vulnerabilities.

2026-10-13

When a large model captures content, whether to listen to the description file or robots.txt first

The site description file, robots, and sitemap have different responsibilities: the description file is aimed at explaining the site structure to large language models, robots manage which addresses can be crawled, and the sitemap manages which addresses are hoped to be discovered. When there is a conflict in口径, whether to crawl should be based on robots, and the scope should be based on the sitemap. This article explains how to align the three places within the site to avoid reading conflicting signals.

2026-10-13