Security: restrict lightbox_get_image_title to published posts - #9
Open
BrianWillows wants to merge 1 commit into
Open
Security: restrict lightbox_get_image_title to published posts#9BrianWillows wants to merge 1 commit into
BrianWillows wants to merge 1 commit into
Conversation
…hed posts The wp_ajax_nopriv_lightbox_get_image_title endpoint returned the title, content or excerpt of any post ID supplied by an anonymous visitor, disclosing private, draft, pending, trashed and password-protected post content (CWE-862 / CWE-200). Only return data for publicly published, non-password-protected posts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
wp_ajax_nopriv_lightbox_get_image_titlehandler returns the title, content or excerpt of any post ID supplied by an anonymous visitor, with no status/visibility check. An unauthenticated user can enumerate post IDs and read the content of private, draft, pending, trashed and password-protected posts (CWE-862 / CWE-200).This change returns data only for published, non-password-protected posts; anything else returns an empty string.
Fix developed with AI assistance (Claude), reviewed by hand before submission.