Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-4335: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in shortpixel ShortPixel Image Optimizer – Optimize Images, Convert WebP & AVIF

0
Medium
VulnerabilityCVE-2026-4335cvecve-2026-4335cwe-79
Published: Thu Mar 26 2026 (03/26/2026, 02:25:20 UTC)
Source: CVE Database V5
Vendor/Project: shortpixel
Product: ShortPixel Image Optimizer – Optimize Images, Convert WebP & AVIF

Description

The ShortPixel Image Optimizer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the attachment post_title in all versions up to, and including, 6.4.3. This is due to insufficient output escaping in the getEditorPopup() function and its corresponding media-popup.php template. Specifically, the attachment's post_title is retrieved from the database via get_post() in AjaxController.php (line 435) and passed directly to the view template (line 449), where it is rendered into an HTML input element's value attribute without esc_attr() escaping (media-popup.php line 139). Since WordPress allows Authors to set arbitrary attachment titles (including double-quote characters) via the REST API, a malicious author can craft an attachment title that breaks out of the HTML attribute and injects arbitrary JavaScript event handlers. This makes it possible for authenticated attackers, with Author-level access and above, to inject arbitrary web scripts that execute whenever a higher-privileged user (such as an administrator) opens the ShortPixel AI editor popup (Background Removal or Image Upscale) for the poisoned attachment.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/26/2026, 18:15:28 UTC

Technical Analysis

CVE-2026-4335 is a stored Cross-Site Scripting (XSS) vulnerability identified in the ShortPixel Image Optimizer plugin for WordPress, affecting all versions up to and including 6.4.3. The vulnerability stems from improper neutralization of input during web page generation (CWE-79). Specifically, the plugin fails to properly escape the attachment post_title when rendering it into an HTML input element's value attribute within the getEditorPopup() function and the media-popup.php template. The post_title is retrieved from the database using get_post() in AjaxController.php and passed directly to the view template without esc_attr() escaping. Since WordPress allows users with Author-level permissions and above to set arbitrary attachment titles via the REST API, a malicious author can inject double-quote characters and JavaScript event handlers into the post_title. This crafted input breaks out of the HTML attribute context, enabling injection of arbitrary JavaScript code. The injected script executes when a higher-privileged user, such as an administrator, opens the ShortPixel AI editor popup (used for Background Removal or Image Upscale) for the poisoned attachment. This attack vector requires the attacker to have authenticated Author-level access and requires the victim to interact with the malicious attachment in the admin interface. The vulnerability does not affect unauthenticated users and does not lead to direct system compromise but can facilitate session hijacking, privilege escalation, or further attacks within the WordPress environment. The CVSS v3.1 base score is 5.4, indicating medium severity, with attack vector being network, low attack complexity, requiring privileges, and user interaction. No known exploits are currently in the wild, but the vulnerability is publicly disclosed and should be addressed promptly.

Potential Impact

The primary impact of CVE-2026-4335 is the potential for authenticated attackers with Author-level access to inject persistent malicious JavaScript into the WordPress admin interface. This can lead to session hijacking, credential theft, or unauthorized actions performed with the privileges of higher-level users such as administrators. In multi-user WordPress environments, especially those with multiple content creators and editors, this vulnerability can be leveraged to escalate privileges or disrupt site management. While the vulnerability does not allow direct remote code execution or server compromise, the ability to execute arbitrary scripts in the context of an administrator's browser can have severe consequences, including defacement, data exfiltration, or installation of further malware. Organizations relying on ShortPixel Image Optimizer for image processing and optimization on WordPress sites are at risk, particularly if they allow multiple authors or editors to upload and manage media. The attack requires user interaction by the administrator, which may limit automated exploitation but does not eliminate risk. The absence of known exploits in the wild suggests limited current exploitation but does not preclude future attacks. Overall, the vulnerability poses a moderate risk to confidentiality and integrity within affected WordPress sites.

Mitigation Recommendations

To mitigate CVE-2026-4335, organizations should immediately update the ShortPixel Image Optimizer plugin to a version where this vulnerability is patched once available. Until an official patch is released, administrators should restrict Author-level permissions to trusted users only and monitor for suspicious attachment titles containing unusual characters or scripts. Implementing Web Application Firewall (WAF) rules to detect and block suspicious payloads in REST API requests targeting attachment titles can reduce exploitation risk. Additionally, site administrators should avoid opening the ShortPixel AI editor popup for attachments uploaded by untrusted authors. Applying strict Content Security Policy (CSP) headers can help mitigate the impact of injected scripts by restricting script execution contexts. Regularly auditing user roles and permissions to minimize the number of users with Author-level or higher access reduces the attack surface. Finally, developers maintaining WordPress plugins should ensure proper output escaping using esc_attr() or equivalent functions when rendering user-controlled data in HTML attributes to prevent similar XSS vulnerabilities.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Wordfence
Date Reserved
2026-03-17T14:15:42.197Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69c574363c064ed76f968193

Added to database: 3/26/2026, 6:00:22 PM

Last enriched: 3/26/2026, 6:15:28 PM

Last updated: 3/26/2026, 7:15:49 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses