MEDIUM 6.4

CVE-2026-9620: WP Latest Posts Stored XSS Vulnerability (v5.0.11)

The WP Latest Posts WordPress plugin contains a stored cross-site scripting (XSS) vulnerability in versions up to 5.0.11. An authenticated attacker with author-level permissions can inject malicious scripts into post content by crafting image tags with specially formatted src attributes. Because the plugin fails to properly escape these values before displaying them, the injected scripts execute in the browsers of any visitor viewing the compromised post. This is a stored attack, meaning the payload persists in the database and affects all subsequent viewers.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-79
Affected products
0 configuration(s)
Published / Modified
2026-06-24 / 2026-06-25

NVD description (verbatim)

The WP Latest Posts plugin for WordPress is vulnerable to Stored Cross-Site Scripting via crafted image src attributes in post content in versions up to, and including, 5.0.11. This is due to insufficient output escaping in the field() and loop() functions, which extract the raw src attribute value from <img> tags within post_content using a regular expression and then reconstruct new <img> elements or CSS background-image declarations by directly concatenating the unescaped value — bypassing WordPress's kses filtering entirely. This makes it possible for authenticated attackers, with author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from insufficient output escaping in the field() and loop() functions of WP Latest Posts. These functions extract src attribute values from <img> tags using regular expressions, then reconstruct image elements or CSS background-image declarations by directly concatenating the unescaped values. This approach bypasses WordPress's kses sanitization layer entirely. An authenticated attacker with author-level access can inject arbitrary JavaScript that will execute in the context of any page displaying the affected post. The CWE classification (CWE-79: Improper Neutralization of Input During Web Page Generation) confirms the root cause as insufficient input validation and output encoding.

Business impact

This vulnerability allows attackers with author-level access to compromise the integrity and confidentiality of your WordPress site. Injected scripts can steal user session tokens, modify page content, capture form submissions, or redirect visitors to malicious sites. For multi-author sites, a compromised author account becomes a vector for sitewide XSS attacks. Customer trust, regulatory compliance (especially for sites handling sensitive data), and SEO reputation are all at risk if injected content is discovered by users or security scanners.

Affected systems

WP Latest Posts plugin versions up to and including 5.0.11 are affected. The vulnerability requires the attacker to have at least author-level credentials (author, editor, or administrator role). Sites using older versions of the plugin are immediately at risk; verify your installed version against the plugin repository or your site's plugin management interface.

Exploitability

Exploitation requires pre-existing authenticated access at the author level or above. No unauthenticated attack vector exists. However, author-level accounts are relatively common in multi-user WordPress environments, particularly on publishing or team collaboration sites. The attack is straightforward: craft a post with an <img> tag containing a malicious src attribute, publish it, and the payload executes whenever the post is viewed. No user interaction beyond normal page viewing is needed for the XSS to trigger (UI:N in the CVSS vector).

Remediation

Update the WP Latest Posts plugin to a patched version released after 5.0.11. Verify against the official WordPress plugin repository or the vendor's security advisory for the exact version number. If an update is unavailable, disable or remove the plugin until a fix is confirmed. Additionally, audit posts created by author-level users for suspicious or unusual image src attributes that may indicate prior exploitation. Review author account access logs to identify compromise.

Patch guidance

Visit the WordPress plugin dashboard and check for available updates to WP Latest Posts. Apply the update as soon as testing confirms compatibility with your WordPress version and active theme/plugins. If you are using a custom or third-party hosting service, some platforms provide automated plugin updates; verify that auto-updates are enabled or manually trigger the update. Always back up your database and site files before applying updates. Test the update in a staging environment first if this is a production site with critical functionality.

Detection guidance

Search post_content in your WordPress database for <img> tags containing unusual or suspicious src attributes—particularly those with encoded JavaScript (javascript: protocol, event handlers encoded as entities, or Base64 payloads). Use WordPress security plugins (e.g., Wordfence, Sucuri, iThemes Security) to scan for stored XSS patterns in post metadata and content. Monitor your web server logs for requests to pages known to contain WP Latest Posts shortcodes or template calls, and inspect the HTML response for unexpected script tags. Check the WP Latest Posts plugin code in your /wp-content/plugins/ directory for calls to field() or loop() functions; verify they are properly escaping output using WordPress functions like esc_attr() or esc_url().

Why prioritize this

Although the CVSS score of 6.4 (MEDIUM) reflects the authentication requirement, the vulnerability is stored XSS affecting all site visitors and should be prioritized. The attack is trivial to execute for any compromised or malicious author, the impact on site visitors is high (arbitrary script execution), and the persistence in the database means cleanup is necessary even after patching. This is especially critical for publishing platforms, community sites, and any installation where you do not fully trust all author-level users.

Risk score, explained

The CVSS 3.1 score of 6.4 (MEDIUM) reflects: Attack Vector Network (remote exploitation possible), Access Complexity Low (straightforward payload injection), Privileges Required (author level needed, limiting the attacker pool), User Interaction None (no end-user action required for XSS to execute), and Scope Changed (impact extends beyond the vulnerable component to other users' browsers). Integrity and Confidentiality are impacted (I:L, C:L), but Availability is not (A:N). The score appropriately penalizes the authentication requirement but does not fully capture the reputational and compliance risks of stored XSS on a public-facing website.

Frequently asked questions

Do I need author-level credentials to exploit this?

Yes. The attacker must be an authenticated WordPress user with at least author-level permissions (author, editor, or administrator). This limits the attacker pool to internal or compromised accounts, but does not eliminate the risk in multi-author environments.

Does updating the plugin remove injected payloads from my site?

No. Updating the plugin fixes the vulnerability in the code, but does not automatically remove malicious content already stored in post_content. You must manually audit and clean existing posts for suspicious image src attributes. Use your database admin tool or WordPress plugins designed to scan for and remove stored XSS.

Why does this bypass WordPress security functions like kses?

The vulnerable code extracts the src value from the HTML using a regex, then reconstructs the image tag by concatenating the unescaped string directly into HTML output. This happens outside the normal WordPress post content pipeline, so kses filtering—which operates on the initial post save—never sees the reconstructed output. Proper escaping using esc_attr() or esc_url() in the plugin's output functions would have prevented this.

Can I disable the plugin instead of updating it?

Yes, if a patch is not yet available or you cannot immediately deploy it. Deactivating and removing the plugin eliminates the vulnerability, but you will lose any functionality provided by WP Latest Posts. Consider a temporary workaround or alternative plugin until a patched version is available.

This analysis is provided for informational purposes and reflects publicly disclosed vulnerability details as of the publication date. No exploit code or step-by-step weaponization instructions are included. Organizations are responsible for verifying the applicability of this vulnerability to their environment, testing patches thoroughly before production deployment, and conducting their own risk assessments. Vendor advisories and official patch releases are the authoritative source for remediation details and affected version numbers. SEC.co makes no warranty regarding the completeness or timeliness of this analysis. Source: NVD (public-domain), retrieved 2026-07-30. Analysis generated by SEC.co (claude-haiku-4-5).