Skip to content

Security: restrict lightbox_get_image_title to published posts - #9

Open
BrianWillows wants to merge 1 commit into
tronsha:masterfrom
BrianWillows:security-fix-unauth-post-disclosure
Open

Security: restrict lightbox_get_image_title to published posts#9
BrianWillows wants to merge 1 commit into
tronsha:masterfrom
BrianWillows:security-fix-unauth-post-disclosure

Conversation

@BrianWillows

Copy link
Copy Markdown

The wp_ajax_nopriv_lightbox_get_image_title handler 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.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants