Skip to content

ContentImporter missing source post read permission check #610

@apermo

Description

@apermo

Description

The ContentImporter does not verify that the current user has read_post permission on the source post before importing its content. A user could potentially import content from a private post on another blog they don't have read access to.

Location

includes/ContentImport/ContentImporter.phphandle_import() and pre_flight_check() verify the nonce and check for msls_import in POST data, but never call current_user_can('read_post', $source_post_id) on the source blog.

Risk

Lower than a REST endpoint since the import is gated behind nonce verification and POST submission (requires an active admin session), but the gap still exists.

Found during

Code review of #609 (see discussion).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions