WPGraphQL: Contributor can publish and modify posts without the required capabilities via updatePost
wp-graphql
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| wp-graphql/wp-graphql Packagist |
| No fix yet |
Original description
WPGraphQL provides a GraphQL API for WordPress sites. Prior to 2.22.2, the updatePost mutation in src/Mutation/PostObjectUpdate.php checks only the collection-level edit_posts capability and the post author, but does not enforce the object-level edit_post capability or require publish_posts for public status transitions. An authenticated Contributor can therefore publish the Contributor's own draft without editorial approval or modify the Contributor's previously published post despite lacking edit_published_posts, while posts owned by other authors remain protected. This issue is fixed in version 2.22.2.
From the CVE record · GitHub_M