Skip to main content
Vulnerability Database/CVE-2024-21726

CVE-2024-21726: Joomla! XSS Vulnerability

CVE-2024-21726 is a cross-site scripting flaw in Joomla! caused by inadequate content filtering in various components. This allows attackers to inject malicious scripts. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-21726 Overview

CVE-2024-21726 is a cross-site scripting (XSS) vulnerability in the Joomla content management system. The flaw results from inadequate content filtering within the Joomla filter code, allowing attackers to inject malicious scripts that execute in a victim's browser. The vulnerability affects multiple components across Joomla core and carries a notable exploit probability based on EPSS data.

Critical Impact

Successful exploitation can lead to remote code execution in administrator contexts when a privileged user interacts with crafted content, enabling full site compromise.

Affected Products

  • Joomla! 1.5.0 through 3.10.15-elts
  • Joomla! 4.0.0 through 4.4.2
  • Joomla! 5.0.0 through 5.0.2

Discovery Timeline

  • 2024-02-29 - CVE CVE-2024-21726 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-21726

Vulnerability Analysis

The vulnerability is classified under [CWE-79] (Improper Neutralization of Input During Web Page Generation). It affects the Joomla filter component responsible for sanitizing user-supplied input across multiple core components. Attackers can craft input that bypasses the existing filter logic, allowing script content to persist in rendered output.

Researchers at SonarSource identified the flaw and documented how administrator sessions can be hijacked through crafted content. When a Joomla administrator views an affected page, the injected JavaScript executes with administrative privileges. This execution path enables account takeover, privilege abuse, and in several configurations full remote code execution through Joomla's template or extension installation features.

The root issue is network-reachable and requires no authentication to inject the payload, though user interaction from a privileged victim is typically required to trigger the highest-impact outcomes.

Root Cause

The filter code within Joomla core fails to adequately neutralize certain multibyte or encoded character sequences. The sanitizer processes input in a manner that leaves script-executable artifacts intact in the output HTML. Several Joomla components rely on this shared filter, which widens the vulnerable surface across the application.

Attack Vector

An unauthenticated remote attacker submits crafted input through any Joomla endpoint that routes user data through the vulnerable filter. The stored payload later executes in the browser of a user viewing the content, including administrators. See the SonarSource analysis for detailed exploitation mechanics.

No verified public proof-of-concept code is included here. Refer to the Joomla Security Advisory #929 for upstream technical detail.

Detection Methods for CVE-2024-21726

Indicators of Compromise

  • Unexpected <script> tags, event handlers (onerror, onload), or javascript: URIs stored within article content, module parameters, or category descriptions.
  • Administrator sessions originating from unusual IP addresses shortly after content submission events.
  • New administrator accounts, modified user groups, or newly installed templates and extensions without corresponding change records.

Detection Strategies

  • Review Joomla access logs for POST requests to content endpoints (/administrator/index.php?option=com_content, /index.php?option=com_contact) containing encoded script fragments.
  • Perform static scans of the #__content, #__modules, and #__categories database tables for HTML tags and encoded payloads that should have been filtered.
  • Correlate web application firewall logs with authentication events to identify stored payloads that preceded suspicious administrative actions.

Monitoring Recommendations

  • Alert on changes to the #__users table where block=0 and new entries hold Super Users group membership.
  • Monitor file writes to templates/, plugins/, and administrator/components/ directories outside planned maintenance windows.
  • Capture and inspect outbound HTTP requests from the Joomla server for signs of credential exfiltration triggered by stored XSS.

How to Mitigate CVE-2024-21726

Immediate Actions Required

  • Upgrade Joomla to version 3.10.15-elts, 4.4.3, or 5.0.3 depending on the deployed branch.
  • Audit all administrator and super-user accounts, rotate credentials, and invalidate active sessions.
  • Review installed templates, plugins, and components for unauthorized additions or modifications made before patching.

Patch Information

The Joomla project released patched versions on February 20, 2024. Refer to Joomla Security Advisory #929 for the authoritative patch matrix and upgrade instructions.

Workarounds

  • Restrict administrator panel access by IP allowlist at the web server or firewall layer until patching is complete.
  • Deploy a web application firewall rule that strips or blocks HTML and script content in request bodies submitted to Joomla content endpoints.
  • Disable public-facing contact forms, user registration, and comment components that pass input through the vulnerable filter.
bash
# Example WAF rule (ModSecurity) to block script payloads targeting Joomla content endpoints
SecRule REQUEST_URI "@contains /administrator/index.php" \
    "id:1002101,phase:2,deny,status:403,\
    chain,msg:'Potential CVE-2024-21726 XSS payload'"
    SecRule ARGS "@rx (?i)(<script|javascript:|onerror=|onload=)" \
        "t:none,t:urlDecodeUni,t:htmlEntityDecode"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.