Make WordPress Core

Opened 2 days ago

Last modified 2 days ago

#66790 new defect (bug)

Escape the parent post title in the attachment edit screen's "Uploaded to" section

Reported by: johnbillion Owned by:
Priority: normal Milestone: 7.3
Component: Media Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

attachment_submitbox_metadata() prints the parent post title in the "Uploaded to" section without escaping. Other places in the admin escape post titles. This output was added in [49207] (#46866).

The fix is to wrap $uploaded_to_title in esc_html() and $uploaded_to_link in esc_url(). The "Uploaded by" output just above it needs the same change.


This was originally reported to the WordPress VDP on HackerOne but has no immediate security impact so it's being handled publicly.

Change History (2)

This ticket was mentioned in ​PR #16179 on ​WordPress/wordpress-develop by ​@johnbillion.


2 days ago
#1

  • Keywords has-patch added

Escapes the author name, parent post title, and their links in the "Uploaded by" and "Uploaded to" sections of the attachment edit screen.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Writing the change, which I reviewed.

#2 @johnbillion
2 days ago

  • Milestone Awaiting Review → 7.3
Note: See TracTickets for help on using tickets.