CVE-2026-4804

Zakra <= 4.2.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Post Meta REST API

Published Jul 3, 2026 CVSS 3.1 · 6.4 Medium EPSS < 1% KEV · Not listed
Description
The Zakra theme for WordPress is vulnerable to Stored Cross-Site Scripting via post meta values in all versions up to, and including, 4.2.0. This is due to the theme registering three post meta fields (zakra_menu_item_color, zakra_menu_item_hover_color, and zakra_menu_item_active_color) with 'show_in_rest' => true and 'auth_callback' => '__return_true', but without any sanitize_callback parameter in the register_post_meta() calls. While the classic editor save path applies sanitize_hex_color() sanitization, the REST API path completely bypasses this protection. The unsanitized meta values are then retrieved via get_post_meta() and concatenated directly into CSS strings that are output through wp_add_inline_style() without any escaping. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses the injected page.

Analysis

AI-generated

Technical impact

The Zakra WordPress theme registers three post meta fields that are exposed through the REST API without proper sanitization; when a contributor or higher‑level user creates or updates these fields via the API, the unsanitized values are stored and later concatenated directly into CSS strings output by wp_add_inline_style without escaping. This allows an attacker to inject arbitrary JavaScript that will execute in the browsers of any visitor to the affected page, compromising the integrity of site content. The flaw stems from missing sanitize_callback parameters in register_post_meta() calls while still permitting the fields to be accessed by the API.

Affected Systems

All WordPress installations using ThemeGrill's Zakra theme up to and including version 4.2.0 are vulnerable. The issue is limited to the Zakra product and only affects users with Contributor or elevated roles who can modify post meta through the REST API.

Risk and Exploitability

The vulnerability has a CVSS score of 6.4, indicating moderate severity, and an EPSS score of less than 1%, suggesting a low probability of exploitation at the present time. It is not listed in CISA’s KEV catalog. Attackers must first have Contributor or higher privileges to insert malicious payloads. Once injected, the script runs client‑side whenever any visitor loads the injected post or page. The lack of immediate exploitation data means the risk is lower, but the impact remains significant if abused.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Zakra theme to version 4.2.1 or later to eliminate the vulnerable meta registrations and add proper sanitization.
  • Restrict Contributor and higher-level roles to trusted users only, limiting the accounts that can inject scripts via the REST API.
  • Implement a Content Security Policy that blocks inline scripts and restricts script sources to mitigate the impact if an injection occurs.
  • Disable or restrict the REST API endpoints that expose the vulnerable meta fields for users without administrator privileges.

Generated by OpenCVE AI on August 1, 2026 at 20:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Themegrill
Themegrill zakra
Wordpress
Wordpress wordpress
Vendors & Products Themegrill
Themegrill zakra
Wordpress
Wordpress wordpress
Type Values Removed Values Added
Description The Zakra theme for WordPress is vulnerable to Stored Cross-Site Scripting via post meta values in all versions up to, and including, 4.2.0. This is due to the theme registering three post meta fields (zakra_menu_item_color, zakra_menu_item_hover_color, and zakra_menu_item_active_color) with 'show_in_rest' => true and 'auth_callback' => '__return_true', but without any sanitize_callback parameter in the register_post_meta() calls. While the classic editor save path applies sanitize_hex_color() sanitization, the REST API path completely bypasses this protection. The unsanitized meta values are then retrieved via get_post_meta() and concatenated directly into CSS strings that are output through wp_add_inline_style() without any escaping. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses the injected page.
Title Zakra <= 4.2.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Post Meta REST API
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
Wordfence
Published
Updated
Jul 6, 2026, 4:25 PM
Reserved
Mar 25, 2026, 11:38 AM
Status
Deferred
Published
Jul 3, 2026, 9:16 AM
Modified
Oct 25, 2026, 9:10 PM