Categories
CVE-2026-33290

WPGraphQL Repo's updateComment allows low-privileged authenticated users to change comment moderation status (comment_approved) without moderate_comments permission

Summary

WPGraphQL Repo's updateComment allows low-privileged authenticated users to change comment moderation status (comment_approved) without moderate_comments permission

Original description

The description as published by the source.

WPGraphQL provides a GraphQL API for WordPress sites. Prior to version 2.10.0, an authorization flaw in updateComment allows an authenticated low-privileged user (including a custom role with zero capabilities) to change moderation status of their own comment (for example to APPROVE) without the moderate_comments capability. This can bypass moderation workflows and let untrusted users self-approve content. Version 2.10.0 contains a patch.

Details

In WPGraphQL 2.9.1 (tested), authorization for updateComment is owner-based, not field-based:

  • plugins/wp-graphql/src/Mutation/CommentUpdate.php:92 allows moderators.
  • plugins/wp-graphql/src/Mutation/CommentUpdate.php:99:99 also allows the comment owner, even if they lack moderation capability.
  • plugins/wp-graphql/src/Data/CommentMutation.php:94:94 maps GraphQL input status directly to WordPress comment_approved.
  • plugins/wp-graphql/src/Mutation/CommentUpdate.php:120:120 persists that value via wp_update_comment.
  • plugins/wp-graphql/src/Type/Enum/CommentStatusEnum.php:22:22 exposes moderation states (APPROVE, HOLD, SPAM, TRASH).

This means a non-moderator owner can submit status during update and transition moderation state.

PoC

Tested in local wp-env (Docker) with WPGraphQL 2.9.1.

  1. Start environment:

npm install
npm run wp-env start

  1. Run this PoC:
  npm run wp-env run cli -- wp eval '
  add_role("no_caps","No Caps",[]);
  $user_id = username_exists("poc_nocaps");
  if ( ! $user_id ) {
    $user_id…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details