CVE-2024-4041
Description
The Yoast SEO plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via URLs in all versions up to, and including, 22.5 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Reflected XSS in Yoast SEO plugin for WordPress up to v22.5 allows unauthenticated attackers to inject arbitrary web scripts via crafted URLs.
Vulnerability
The Yoast SEO plugin for WordPress versions up to and including 22.5 are vulnerable to Reflected Cross-Site Scripting due to insufficient input sanitization and output escaping when handling URLs. The vulnerability resides in the short link helper class [2], where user-supplied data is improperly processed before being included in generated URLs.
Exploitation
An unauthenticated attacker can craft a malicious URL containing arbitrary JavaScript and trick a victim into clicking it (e.g., via phishing). No special privileges are required; the attack only needs user interaction.
Impact
Successful exploitation allows the attacker to inject arbitrary web scripts in the context of the victim's browser. This can lead to session hijacking, data exfiltration, or other malicious actions on the affected WordPress site.
Mitigation
Update to Yoast SEO version 22.6 or later, which contains the fix. As of the publication date, no workaround is available.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
1r3078555Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
6- plugins.trac.wordpress.org/browser/wordpress-seo/trunk/inc/class-wpseo-admin-bar-menu.phpnvd
- plugins.trac.wordpress.org/browser/wordpress-seo/trunk/inc/class-wpseo-shortlinker.phpnvd
- plugins.trac.wordpress.org/browser/wordpress-seo/trunk/src/helpers/short-link-helper.phpnvd
- plugins.trac.wordpress.org/browser/wordpress-seo/trunk/src/helpers/short-link-helper.phpnvd
- plugins.trac.wordpress.org/changeset/3078555/wordpress-seo/trunknvd
- www.wordfence.com/threat-intel/vulnerabilities/id/4e04b161-3cd0-454d-869c-56f42bd8afb0nvd
News mentions
0No linked articles in our index yet.